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 bc181de commit ce341b4Copy full SHA for ce341b4
tests/PHPStan/Analyser/nsrt/bug-13296.php
@@ -0,0 +1,26 @@
1
+<?php
2
+
3
+namespace Bug13296;
4
5
+use function PHPStan\Testing\assertType;
6
7
+class Foo
8
+{
9
+ /**
10
+ * @param non-empty-array<Bar> $a
11
+ * @param non-empty-array<int> $b
12
+ */
13
+ public function test($a, $b)
14
+ {
15
+ assertType('string', current($a)($b));
16
+ }
17
+}
18
19
+class Bar
20
21
+ /** @return string */
22
+ public function __invoke($b)
23
24
+ return '';
25
26
0 commit comments