phpstan icon indicating copy to clipboard operation
phpstan copied to clipboard

@var variable not found if initialized in a test

Open jolan78 opened this issue 2 years ago • 0 comments

Bug report

when a variable designated in a @var type $variable phpdoc comment is initialized in a test, phpstan fails to find it : Variable $variable in PHPDoc tag @var does not exist.

Code snippet that reproduces the problem

https://phpstan.org/r/9566e566-3fb7-40a3-9620-fb08ab0791b1

Expected output

no error

Did PHPStan help you today? Did it make you happy in any way?

Absolutely ! my code gets cleaner and is is satisfying.

jolan78 avatar Sep 05 '22 09:09 jolan78