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 fb84c11 commit bf8e307Copy full SHA for bf8e307
tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php
@@ -397,4 +397,10 @@ public function testNamedArguments(): void
397
]);
398
}
399
400
+ public function testBug577(): void
401
+ {
402
+ $this->checkThisOnly = false;
403
+ $this->analyse([__DIR__ . '/data/bug-577.php'], []);
404
+ }
405
+
406
tests/PHPStan/Rules/Methods/data/bug-577.php
@@ -0,0 +1,18 @@
1
+<?php declare(strict_types = 1);
2
3
+namespace Bug577;
4
5
+class Test
6
+{
7
+ public static function step1(?int $foo): void
8
9
+ if ($foo > 1) {
10
+ static::step2($foo);
11
12
13
14
+ public static function step2(int $bar): void
15
16
+ var_dump($bar);
17
18
+}
0 commit comments