Can't ignore error in @return
Bug report
When I want to ignore an error in an @return statement, I add the @php-ignore line above the @return statement.
Parsers doesn't like that. I get an error: Parse error in @phpstan-ignore: Unexpected T_OTHER '@return' after end, expected comma (,) or end
Code snippet that reproduces the problem
https://phpstan.org/r/175063bb-6b86-467f-8374-a0008aa964ca
Expected output
No error and the error in @return suppressed
Did PHPStan help you today? Did it make you happy in any way?
No response
/cc @janedbal We've talked about this, it would be useful to implement it 😊
Right now in this case you still have to use @phpstan-ignore-next-line.
Both @phpstan-ignore and @phpstan-ignore-next-line require to be the last annotation when inside a doc comment.
See: https://phpstan.org/r/2b5ec0a9-422f-4c11-bf7f-a525aa7bb8aa