Skip to content

Commit b58d311

Browse files
committed
One more test
1 parent 8cee183 commit b58d311

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/PHPStan/Analyser/data/bug-2001.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,18 @@ public function parseUrl(string $url): string
3434

3535
return $redirectUrl;
3636
}
37+
38+
public function doFoo(int $i)
39+
{
40+
$a = ['a' => $i];
41+
if (rand(0, 1)) {
42+
$a['b'] = $i;
43+
}
44+
45+
if (rand(0,1)) {
46+
$a = ['d' => $i];
47+
}
48+
49+
assertType('array(\'a\' => int, ?\'b\' => int)|array(\'d\' => int)', $a);
50+
}
3751
}

0 commit comments

Comments
 (0)