We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8d86be commit 14e0f3dCopy full SHA for 14e0f3d
tests/PHPStan/Analyser/nsrt/array-all.php
@@ -176,4 +176,16 @@ public function test14($array) {
176
}
177
assertType("array<mixed>", $array);
178
179
+
180
+ /**
181
+ * @param array<mixed> $array
182
+ */
183
+ public function test15($array) {
184
+ if (array_all($array, fn ($value) => is_int($value)) === true) {
185
+ assertType("array<int>", $array);
186
+ } else {
187
+ assertType("array<mixed>", $array);
188
+ }
189
190
191
0 commit comments