We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 045e1cd commit 2d9dbbbCopy full SHA for 2d9dbbb
tests/PHPStan/Analyser/nsrt/array-all.php
@@ -2,6 +2,8 @@
2
3
namespace ArrayAll;
4
5
+use DateTime;
6
+
7
use function PHPStan\Testing\assertType;
8
9
class Foo {
@@ -58,4 +60,14 @@ public function test6($array) {
58
60
assertType("array<mixed>", $array);
59
61
}
62
63
64
+ /**
65
+ * @param array<mixed> $array
66
+ */
67
+ public function test7($array) {
68
+ if (array_all($array, fn ($value) => $value instanceof DateTime)) {
69
+ assertType("array<DateTime>", $array);
70
+ }
71
72
73
0 commit comments