Code Duplication    Length = 3-3 lines in 2 locations

lib/Doctrine/ORM/EntityManager.php 2 locations

@@ 501-503 (lines=3) @@
498
        }
499
500
        // Check identity map first, if its already in there just return it.
501
        if (($entity = $this->unitOfWork->tryGetById($sortedId, $class->rootEntityName)) !== false) {
502
            return ($entity instanceof $class->name) ? $entity : null;
503
        }
504
505
        if ($class->subClasses) {
506
            return $this->find($entityName, $sortedId);
@@ 524-526 (lines=3) @@
521
        $class = $this->metadataFactory->getMetadataFor(ltrim($entityName, '\\'));
522
523
        // Check identity map first, if its already in there just return it.
524
        if (($entity = $this->unitOfWork->tryGetById($identifier, $class->rootEntityName)) !== false) {
525
            return ($entity instanceof $class->name) ? $entity : null;
526
        }
527
528
        if ( ! is_array($identifier)) {
529
            $identifier = [$class->identifier[0] => $identifier];