- Edited
Having this code:
<?php declare(strict_types = 1);
class Test2
{
public function A() : string
{
return "Test";
}
}
$x = Test2::A();
Above the call to method A()
is wrong, as it is no static method. It should be something like $x = (new Test2())->A();
.
PHP Tools does not detect this wrong call. PHPStan does:
Static call to instance method Test2::A().
My suggestion
Please also detect and report those wrong calls.