We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f70b4d commit 7cb81d7Copy full SHA for 7cb81d7
tests/PHPStan/Rules/Arrays/data/bug-11679.php
@@ -32,6 +32,7 @@ public function sayHello(int $index): bool
32
if (!isset($this->arr[$index]['foo'])) {
33
$this->arr[$index]['foo'] = true;
34
assertType('non-empty-array<int, array{foo?: bool}>', $this->arr);
35
+ assertType('array{foo: true}>', $this->arr[$index]);
36
}
37
assertType('array<int, array{foo?: bool}>', $this->arr);
38
return $this->arr[$index]['foo']; // PHPStan does not realize 'foo' is set
0 commit comments