1
0
mirror of synced 2025-02-09 08:49:26 +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);
if ( ! isset($this->entityIdentifiers[$oid])) {
if (empty($this->entityIdentifiers[$oid])) {
return false;
}
$classMetadata = $this->em->getClassMetadata(get_class($entity));
$idHash = implode(' ', $this->entityIdentifiers[$oid]);
if ($idHash === '') {
return false;
}
return isset($this->identityMap[$classMetadata->rootEntityName][$idHash]);
}