File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
tests/PHPStan/Rules/Variables Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -64,4 +64,9 @@ public function testBenevolentArrayKey(): void
64
64
$ this ->analyse ([__DIR__ . '/data/benevolent-array-key.php ' ], []);
65
65
}
66
66
67
+ public function testBug12754 (): void
68
+ {
69
+ $ this ->analyse ([__DIR__ . '/data/bug-12754.php ' ], []);
70
+ }
71
+
67
72
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Bug12754 ;
4
+
5
+ class HelloWorld
6
+ {
7
+ /**
8
+ * @param list<array{string, string}> $list
9
+ * @return void
10
+ */
11
+ public function modify (array &$ list ): void
12
+ {
13
+ foreach ($ list as $ int => $ array ) {
14
+ $ list [$ int ][1 ] = $ this ->apply ($ array [1 ]);
15
+ }
16
+ }
17
+
18
+ /**
19
+ * @param string $value
20
+ * @return string
21
+ */
22
+ public function apply (string $ value ): mixed
23
+ {
24
+ return $ value ;
25
+ }
26
+ }
You can’t perform that action at this time.
0 commit comments