Code Duplication    Length = 9-9 lines in 2 locations

Hydration/EntityHydrator.php 2 locations

@@ 99-107 (lines=9) @@
96
                        /** @var ReflectionClass $concreteClassReflection */
97
                        $concreteClassReflection = $classReflection;
98
99
                        while (!$concreteClassReflection->hasProperty($fieldName)) {
100
                            $concreteClassReflection = $concreteClassReflection->getParentClass();
101
102
                            Assert::object($concreteClassReflection, sprintf(
103
                                "Property '%s' does not exist on object of class '%s'!",
104
                                $fieldName,
105
                                $className
106
                            ));
107
                        }
108
109
                        /** @var ReflectionProperty $propertyReflection */
110
                        $propertyReflection = $concreteClassReflection->getProperty($fieldName);
@@ 160-168 (lines=9) @@
157
                    /** @var ReflectionClass $concreteClassReflection */
158
                    $concreteClassReflection = $classReflection;
159
160
                    while (!$concreteClassReflection->hasProperty($fieldName)) {
161
                        $concreteClassReflection = $concreteClassReflection->getParentClass();
162
163
                        Assert::notNull($concreteClassReflection, sprintf(
164
                            "Property '%s' does not exist on object of class '%s'!",
165
                            $fieldName,
166
                            $className
167
                        ));
168
                    }
169
170
                    /** @var ReflectionProperty $propertyReflection */
171
                    $propertyReflection = $concreteClassReflection->getProperty($fieldName);