You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, the error is expected, just the error message needed adjusting. The expected error message is: Method Parser::unaryOperatorFor() never returns 'not' so it can be removed from the return typehint.
Bug report
When using a native return type
?string
combined with an annotation@phpstan-return UnaryOperator::*|null
, phpstan complains about thestring
typeCode snippet that reproduces the problem
https://phpstan.org/r/0346e5da-af41-4055-92d4-09021e4f5b8f
Expected output
no error being reported.
Did PHPStan help you today? Did it make you happy in any way?
I consider a static analysis of the PHP code a must-have today, so it definitely helps.
The text was updated successfully, but these errors were encountered: