We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f871587 commit 9e28672Copy full SHA for 9e28672
tests/PHPStan/Analyser/nsrt/bug-12244.php
@@ -20,13 +20,25 @@ public function doSomething(): void {
20
if ($this !== self::A) {
21
assertType('$this(Bug12244\X~Bug12244\X::A)', $this);
22
assertType('null', $this->get());
23
+ } else {
24
+ assertType('int', $this->get());
25
+ }
26
+
27
+ if ($this !== self::B && $this !== self::C) {
28
29
}
30
31
32
public static function doSomethingFor(X $x): void {
33
if ($x !== self::A) {
34
assertType('Bug12244\X~Bug12244\X::A', $x);
35
assertType('null', $x->get());
36
37
+ assertType('int', $x->get());
38
39
40
+ if ($x !== self::B && $x !== self::C) {
41
42
43
44
0 commit comments