Code Duplication    Length = 5-5 lines in 2 locations

lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php 1 location

@@ 489-493 (lines=5) @@
486
        if ($class->isIdentifierComposite) {
487
            $id = [];
488
489
            foreach ($class->identifier as $fieldName) {
490
                $id[$fieldName] = isset($class->associationMappings[$fieldName])
491
                    ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]
492
                    : $data[$fieldName];
493
            }
494
        } else {
495
            $fieldName = $class->identifier[0];
496
            $id        = [

lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php 1 location

@@ 324-328 (lines=5) @@
321
        if ($class->isIdentifierComposite) {
322
            $idHash = '';
323
324
            foreach ($class->identifier as $fieldName) {
325
                $idHash .= ' ' . (isset($class->associationMappings[$fieldName])
326
                    ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]
327
                    : $data[$fieldName]);
328
            }
329
330
            return $this->_uow->tryGetByIdHash(ltrim($idHash), $class->rootEntityName);
331
        }