1
0
mirror of synced 2025-02-09 08:49:26 +03:00

remove excess check

This commit is contained in:
ReenExe 2016-09-15 19:41:34 +03:00
parent cd11723e63
commit 2ee56a595b

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]);
} }