Skip to content

Commit 2325789

Browse files
committed
Fix deep ArrayItem scope filling on Foreach_ value
1 parent eac1efd commit 2325789

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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)