Skip to content

Commit ca9da16

Browse files
authored
Fix deep ArrayItem scope filling on Foreach_ value (#7873)
1 parent eac1efd commit ca9da16

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,10 @@ private function processArrayItem(ArrayItem $arrayItem, MutatingScope $mutatingS
524524
}
525525

526526
$arrayItem->value->setAttribute(AttributeKey::SCOPE, $mutatingScope);
527+
528+
if ($arrayItem->value instanceof List_) {
529+
$this->processArray($arrayItem->value, $mutatingScope);
530+
}
527531
}
528532

529533
/**

0 commit comments

Comments
 (0)