We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d19f30 commit 0560ae2Copy full SHA for 0560ae2
tests/PHPStan/Analyser/nsrt/bug-12393b.php
@@ -560,6 +560,16 @@ public function doFoo(array $list): void
560
561
}
562
563
+// https://3v4l.org/VvUsp
564
+class CallableArray {
565
+ private array $foo;
566
+
567
+ public function doFoo(callable $foo): void {
568
+ $this->foo = $foo;
569
+ assertType('array', $this->foo); // could be non-empty-array
570
+ }
571
+}
572
573
class StringableFoo {
574
private string $foo;
575
@@ -585,3 +595,4 @@ public function __toString(): string {
585
595
return 'Foo';
586
596
587
597
598
0 commit comments