Skip to content

Commit 60c3118

Browse files
committed
Quickfix for FNSR issue
1 parent 0d6e191 commit 60c3118

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Analyser/NodeScopeResolver.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,11 +799,12 @@ private function processStmtNode(
799799
$executionEnds = [];
800800
$methodImpurePoints = [];
801801
$statementResult = $this->processStmtNodesInternal($stmt, $stmt->stmts, $methodScope, $storage, static function (Node $node, Scope $scope) use ($nodeCallback, $methodScope, &$gatheredReturnStatements, &$gatheredYieldStatements, &$executionEnds, &$methodImpurePoints): void {
802-
$nodeCallback($node, $scope);
803802
if ($scope->getFunction() !== $methodScope->getFunction()) {
803+
$nodeCallback($node, $scope);
804804
return;
805805
}
806806
if ($scope->isInAnonymousFunction()) {
807+
$nodeCallback($node, $scope);
807808
return;
808809
}
809810
if ($node instanceof PropertyAssignNode) {
@@ -814,6 +815,7 @@ private function processStmtNode(
814815
&& $scope->getFunction()->getDeclaringClass()->getConstructor()->getName() === $scope->getFunction()->getName()
815816
&& TypeUtils::findThisType($scope->getType($node->getPropertyFetch()->var)) !== null
816817
) {
818+
$nodeCallback($node, $scope);
817819
return;
818820
}
819821
$methodImpurePoints[] = new ImpurePoint(
@@ -823,8 +825,10 @@ private function processStmtNode(
823825
'property assignment',
824826
true,
825827
);
828+
$nodeCallback($node, $scope);
826829
return;
827830
}
831+
$nodeCallback($node, $scope);
828832
if ($node instanceof ExecutionEndNode) {
829833
$executionEnds[] = $node;
830834
return;

0 commit comments

Comments
 (0)