Skip to content

Commit 09c0a75

Browse files
committed
Update dynamic-static-call.php
1 parent 10652b4 commit 09c0a75

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/PHPStan/Rules/Methods/data/dynamic-static-call.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ final static public function finalFoo():int
2929

3030
class Baz {
3131
function doBaz(Foo $foo, FinalFoo $finalFoo, Bar $bar):void {
32-
$foo::doFoo();
33-
$finalFoo::doFoo();
34-
$bar::finalFoo();
32+
$foo::doFoo(); // no error, subclass could override static method with impure impl
33+
$finalFoo::doFoo(); // could error, because final class
34+
$bar::finalFoo(); // could error, because final method
3535
}
3636
}

0 commit comments

Comments
 (0)