Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 289-293 (lines=5) @@
286
        if ($class->isIdentifierComposite) {
287
            $idHash = '';
288
289
            foreach ($class->identifier as $fieldName) {
290
                $idHash .= ' ' . (isset($class->associationMappings[$fieldName])
291
                    ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]
292
                    : $data[$fieldName]);
293
            }
294
295
            return $this->_uow->tryGetByIdHash(ltrim($idHash), $class->rootEntityName);
296
        } else if (isset($class->associationMappings[$class->identifier[0]])) {

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        = [