Code Duplication    Length = 3-3 lines in 2 locations

EntityManager.php 2 locations

@@ 55-57 (lines=3) @@
52
        $id       = IdentifierFixer::fixScalarId($id, $metadata);
53
54
        /** @var EntityMetadata $metadata */
55
        if (false !== ($entity = $this->getUnitOfWork()->tryGetById($id, $metadata->rootEntityName))) {
56
            return $entity instanceof $metadata->name ? $entity : null;
57
        }
58
59
        return $this->getUnitOfWork()->getEntityPersister($className)->loadById($id);
60
    }
@@ 175-177 (lines=3) @@
172
        $metadata = $this->getClassMetadata($entityName);
173
        $id       = IdentifierFixer::fixScalarId($id, $metadata);
174
175
        if (false !== ($entity = $this->getUnitOfWork()->tryGetById($id, $metadata->rootEntityName))) {
176
            return $entity instanceof $metadata->name ? $entity : null;
177
        }
178
179
        $proxy = $this->getProxyFactory()->getProxy($entityName, $id);
180
        $this->getUnitOfWork()->registerManaged($proxy, $id, null);