-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Methods like sendResponse() should contain never-return typehint #290
Comments
The official type name is just |
|
janbarasek
added a commit
to janbarasek/application
that referenced
this issue
Jul 7, 2021
dg
pushed a commit
that referenced
this issue
Jul 7, 2021
Solved by #291 |
dg
pushed a commit
that referenced
this issue
Aug 24, 2021
dg
pushed a commit
that referenced
this issue
Sep 12, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I think methods like
sendJson()
should contain PHPStan annotation@phpstan-return never-return
like this:Currently, this can generate hundreds of errors when PhpStan reports possible undefined variables. The annotation marks the code after this call as dead.
For example:
Yes, there is an official extension for PhpStan and Nette framework that does this solution, but it would be good to have native support as well.
Thanks!
The text was updated successfully, but these errors were encountered: