Skip to content

Commit

Permalink
fix already assigned in anon-func
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Feb 25, 2024
1 parent 342e842 commit 1ebb95e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Node/ClassPropertiesNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ public function getUninitializedProperties(
continue;
}

if ($usageScope->isInAnonymousFunction() && $usageScope->getParentScope() !== null) {
$usageScope = $usageScope->getParentScope();
}

$propertyReflection = $usageScope->getPropertyReflection($fetchedOnType, $propertyName);
if ($propertyReflection === null) {
continue;
Expand Down

0 comments on commit 1ebb95e

Please sign in to comment.