Skip to content

Commit 913945c

Browse files
committed
Fix
1 parent 5c9fadb commit 913945c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,11 @@ private function processStmtNode(
868868

869869
foreach ($gatheredReturnStatements as $statement) {
870870
if ($finalScope === null) {
871-
$finalScope = $statement->getScope();
871+
$finalScope = $statement->getScope()->toMutatingScope();
872872
continue;
873873
}
874874

875-
$finalScope = $finalScope->mergeWith($statement->getScope());
875+
$finalScope = $finalScope->mergeWith($statement->getScope()->toMutatingScope());
876876
}
877877

878878
if ($finalScope !== null) {

0 commit comments

Comments
 (0)