Code Duplication    Length = 6-6 lines in 2 locations

src/utils/hydrator/Hydrator.php 2 locations

@@ 37-42 (lines=6) @@
34
            $map = \array_keys($data);
35
            $map = \array_combine($map, $map);
36
        }
37
        foreach ($map as $fieldName => $propertyName) {
38
            if (isset($data[$fieldName]) && $reflection->hasProperty($propertyName)) {
39
                $property = $this->getProperty($reflection, $propertyName);
40
                $property->setValue($object, $data[$fieldName]);
41
            }
42
        }
43
44
        return $object;
45
    }
@@ 67-72 (lines=6) @@
64
            $propertyList = $this->getReflectionPropertyList($className);
65
            $map = \array_combine($propertyList, $propertyList);
66
        }
67
        foreach ($map as $fieldName => $propertyName) {
68
            if ($reflection->hasProperty($propertyName)) {
69
                $property = $this->getProperty($reflection, $propertyName);
70
                $result[$fieldName] = $property->getValue($object);
71
            }
72
        }
73
74
        return $result;
75
    }