Hi,
With the version v1.49.15818 (pre-release) of your tool, I have a lot of error related to inheritance.
When we have a function in an abstract class with one argument "self $myArg" then if we pass one child class to this function PHPTool reports an error.
Argument '1' passed to myMethod() is expected to be of type Devsense\Common\TestB, Devsense\Common\TestA givenPHP(PHP0406)
<?php
namespace Devsense\Common;
abstract class AbstractTest
{
/**
* @param self $myArg
* @return mixed
*/
public function myMethod(self $myArg): mixed
{
return null;
}
}
final class TestA extends AbstractTest
{
}
final class TestB extends AbstractTest
{
}
$testB = new TestB();
$testB->myMethod(new TestA());