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

@@ 462-466 (lines=5) @@
459
        if ($class->isIdentifierComposite) {
460
            $id = [];
461
462
            foreach ($class->identifier as $fieldName) {
463
                $id[$fieldName] = isset($class->associationMappings[$fieldName])
464
                    ? $data[$class->associationMappings[$fieldName]['joinColumns'][0]['name']]
465
                    : $data[$fieldName];
466
            }
467
        } else {
468
            $fieldName = $class->identifier[0];
469
            $id        = [