We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7738398 commit fea60a0Copy full SHA for fea60a0
tests/PHPStan/Analyser/nsrt/overwritten-arrays.php
@@ -102,30 +102,4 @@ public function doFoo6(array $a): void
102
assertType('array<int, 1|2|string>', $a);
103
}
104
105
- /**
106
- * @param array<int, string> $a
107
- */
108
- public function doFoo7(array $a): void
109
- {
110
- foreach ($a as &$v) {
111
- $v = 1;
112
- }
113
-
114
- assertType('array<int, 1>', $a);
115
116
117
118
119
120
- public function doFoo8(array $a): void
121
122
123
- if (rand(0, 1)) {
124
125
126
127
128
- assertType('array<int, 1|string>', $a);
129
130
131
0 commit comments