Skip to content

Commit 21e150e

Browse files
phpstan-botclaude
andcommitted
Add test for nested array dim fetch with by-ref parameter
Address review comment: test that `$array[1][]` passed to a by-reference parameter also does not produce a false positive. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 5418d4f commit 21e150e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/PHPStan/Rules/Arrays/data/bug-5290.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ public function bar(?bool &$value): void {
2222

2323
$foo = new Foo();
2424
$foo->bar($array[]);
25+
26+
// Nested array dim fetch with by-ref parameter
27+
set($array[1][]);

0 commit comments

Comments
 (0)