Consider this code:
<?php declare(strict_types = 1);
class Test3
{
}
$t3 = new Test3(1);
Here, I'm calling a non-existing constructor.
PHP Tools does not detect this, PHPStan does detect it and reports:
Class Test3 does not have a constructor and must be instantiated without any parameters.
Another example of what is not detected is:
<?php declare(strict_types = 1);
class Test3
{
public function __construct(int $a)
{
$a++;
}
}
$t3 = new Test3(1, 2);
PHPStan does detect it.
Suggestion
Please detect and report wrong constructor calls.