Skip to content

Commit

Permalink
FamilyRelationsAnalyzer: final classes can't have children (#4913)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Sep 5, 2023
1 parent 1812281 commit 8c5cfaf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/FamilyTree/Reflection/FamilyRelationsAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public function __construct(
*/
public function getChildrenOfClassReflection(ClassReflection $desiredClassReflection): array
{
if ($desiredClassReflection->isFinalByKeyword()) {
return [];
}

/** @var ClassReflection[] $classReflections */
$classReflections = $this->privatesAccessor->getPrivateProperty($this->reflectionProvider, 'classes');

Expand Down

0 comments on commit 8c5cfaf

Please sign in to comment.