- Edited
Consider this code:
<?php declare(strict_types = 1);
function TestCallable(callable $c) : void
{
}
abstract class AB
{
public static function Foo() : void
{
self::Bar();
TestCallable(function ()
{
$this->Bar();
});
}
public static function Bar() : void
{
}
}
Looking at the call to $this->Bar();
, PHP Tools does not detect the misuse of $this->
(which should be self::
). PHPStan does.
My suggestion
Please let PHP Tools also detect this issue and warn/notify me about it.