Skip to content

Commit

Permalink
Reduce common control flows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Oct 14, 2024
1 parent cf99b96 commit 3214068
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Internal/Hydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,17 +260,16 @@ public static function getPropertyScopes($class): array
continue;
}
$name = $property->name;
$readonlyScope = null;

if (\ReflectionProperty::IS_PRIVATE & $flags) {
$readonlyScope = null;
if ($flags & \ReflectionProperty::IS_READONLY) {
$readonlyScope = $class;
}
$propertyScopes["\0$class\0$name"] = $propertyScopes[$name] = [$class, $name, $readonlyScope, $property];

continue;
}
$readonlyScope = null;
if ($flags & \ReflectionProperty::IS_READONLY) {
$readonlyScope = $property->class;
}
Expand Down

0 comments on commit 3214068

Please sign in to comment.