1
0
mirror of synced 2025-02-15 11:43:16 +03:00

Merge pull request #6038 from ReenExeContributor/cleanup-UnitOfWork

remove excess `check`
This commit is contained in:
Marco Pivetta 2016-11-26 04:59:16 +01:00 committed by GitHub
commit 979fede80c

View File

@ -1582,17 +1582,13 @@ class UnitOfWork implements PropertyChangedListener
{ {
$oid = spl_object_hash($entity); $oid = spl_object_hash($entity);
if ( ! isset($this->entityIdentifiers[$oid])) { if (empty($this->entityIdentifiers[$oid])) {
return false; return false;
} }
$classMetadata = $this->em->getClassMetadata(get_class($entity)); $classMetadata = $this->em->getClassMetadata(get_class($entity));
$idHash = implode(' ', $this->entityIdentifiers[$oid]); $idHash = implode(' ', $this->entityIdentifiers[$oid]);
if ($idHash === '') {
return false;
}
return isset($this->identityMap[$classMetadata->rootEntityName][$idHash]); return isset($this->identityMap[$classMetadata->rootEntityName][$idHash]);
} }