Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Jan 31, 2024
1 parent 1cf556d commit 9baefd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/Mapper/Proxy/Hydrator/ClassPropertiesExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,11 @@ private function findAllInstanceProperties(?ReflectionClass $class = null): arra
return [];
}

return array_merge(
$this->findAllInstanceProperties($class->getParentClass() ?: null), // of course PHP is shit.
array_filter(
return \array_merge(
$this->findAllInstanceProperties($class->getParentClass() ?: null),
\array_filter(
$class->getProperties(),
static function (ReflectionProperty $property): bool {
return !$property->isStatic();
}
static fn(ReflectionProperty $property): bool => !$property->isStatic()
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mapper/Proxy/Hydrator/PropertyMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function isPublicProperty(string $name): bool
public function getPropertyClass(string $name): ?string
{
foreach ($this->properties as $class => $properties) {
if (in_array($name, $properties, true)) {
if (\in_array($name, $properties, true)) {
return $class;
}
}
Expand Down

0 comments on commit 9baefd5

Please sign in to comment.