phpqa --analyzedDirs src/phpstan --output cli --tools phpstan
Output
------ --------------------------------------------------------------------------
Line phpstan/MethodAnnotations.php
------ --------------------------------------------------------------------------
10 Call to an undefined method Whatever\Swift_SmtpTransport::setUsername().
14 Call to an undefined method Whatever\Swift_SmtpTransport::setUsername().
------ --------------------------------------------------------------------------
------ -----------------------------------------------------------
Line phpstan/Proxy.php
------ -----------------------------------------------------------
29 Property Whatever\Proxy::$pdo (null) does not accept PDO.
30 Cannot call method setAttribute() on null.
------ -----------------------------------------------------------
------ ------------------------------------------------------------------------------
Line phpstan/Singleton.php
------ ------------------------------------------------------------------------------
14 Static property Whatever\Singleton::$facade (null) does not accept stdClass.
------ ------------------------------------------------------------------------------
[ERROR] Found 5 errors
I am talking about errors in my tests, not in 3rd party code.
And I really don't want to add annotation to every test with mocks (previously I thought about adding annotations to
ObjectProphecy
etc.).