Skip to content

Commit

Permalink
minor #58566 Reduce common control flows (alexandre-daubois)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Oct 18, 2024
2 parents 42484a5 + 3214068 commit 1a6a89f
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 1a6a89f

Please sign in to comment.