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 958d7a7 commit 83f1509Copy full SHA for 83f1509
tests/PHPStan/Analyser/nsrt/bug-3474.php
@@ -0,0 +1,26 @@
1
+<?php
2
+
3
+namespace Bug3474;
4
5
+use function PHPStan\Testing\assertType;
6
7
+/**
8
+ * @param mixed[] $a
9
+ */
10
+function acceptsArray(array $a) : void{
11
12
+}
13
14
15
16
17
+function dummy(array $a) : void{
18
+ if(!is_array($a["test"])){
19
+ throw new \RuntimeException("oops");
20
+ }
21
22
+ assertType('array<mixed, mixed>', $a['test']);
23
+ assertType('array<mixed, mixed>', $a["test"]);
24
25
+ acceptsArray($a['test']);
26
0 commit comments