Skip to content

Commit 1a6a89f

Browse files
committed
minor #58566 Reduce common control flows (alexandre-daubois)
This PR was merged into the 7.2 branch. Discussion ---------- Reduce common control flows | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Commits ------- d71b4faa50 Reduce common control flows
2 parents 42484a5 + 3214068 commit 1a6a89f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Internal/Hydrator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,17 +260,16 @@ public static function getPropertyScopes($class): array
260260
continue;
261261
}
262262
$name = $property->name;
263+
$readonlyScope = null;
263264

264265
if (\ReflectionProperty::IS_PRIVATE & $flags) {
265-
$readonlyScope = null;
266266
if ($flags & \ReflectionProperty::IS_READONLY) {
267267
$readonlyScope = $class;
268268
}
269269
$propertyScopes["\0$class\0$name"] = $propertyScopes[$name] = [$class, $name, $readonlyScope, $property];
270270

271271
continue;
272272
}
273-
$readonlyScope = null;
274273
if ($flags & \ReflectionProperty::IS_READONLY) {
275274
$readonlyScope = $property->class;
276275
}

0 commit comments

Comments
 (0)