Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,11 @@ private function findClassReflectionWithProperty(
}

$parentClass = $classReflection->getParentClass();
while ($parentClass !== null) {
if ($parentClass !== null) {
$methodWithDeclaringClass = $this->findClassReflectionWithProperty($parentClass, $parentClass, $propertyName);
Copy link
Contributor Author

@staabm staabm Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this recursive call will already work its way to the top parent class. we don't need another loop thru all parents.

see how the number of calls increased on each parent class before this PR:

grafik

if ($methodWithDeclaringClass !== null) {
return $methodWithDeclaringClass;
}

$parentClass = $parentClass->getParentClass();
}

foreach ($classReflection->getInterfaces() as $interfaceClass) {
Expand Down
Loading