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 000330b commit 74e94feCopy full SHA for 74e94fe
tests/PHPStan/Analyser/nsrt/bug11488.php
@@ -6,6 +6,28 @@
6
7
class Foo
8
{
9
+ /**
10
+ * @param array{mixed}|array{0: mixed, 1?: string|null} $row
11
+ */
12
+ protected function testOptionalKeys(array $row): void
13
+ {
14
+ if (count($row) === 1) {
15
+ assertType('array{0: mixed, 1?: string|null}', $row);
16
+ }
17
+
18
+ if (count($row) !== 1) {
19
20
21
22
+ if (count($row) !== 2) {
23
24
25
26
+ if (count($row) !== 3) {
27
28
29
30
31
/**
32
* @param array{mixed}|array{mixed, string|null, mixed} $row
33
*/
0 commit comments