-
Notifications
You must be signed in to change notification settings - Fork 61
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
Unnamed vargs type in callable/Closure phpdoc is silently ignored #125
Comments
I believe phpstan/phpdoc-parser will parse |
For documentation purposes, unnamed variadic callable phpdoc is supported, the |
Please send an update to this page: https://phpstan.org/writing-php-code/phpdoc-types#callables (There's Edit this page on GitHub at the bottom) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
Currently
phpdoc works correctly, but
is silently ignored. No wrong phpdoc error, no error when this type does not match the type of the returned value.
Even if such type is not documented as supported - https://phpstan.org/writing-php-code/phpdoc-types#callables - I belive it should be supported as standard (non-vargs) unnamed parameters are supported.
Code snippet that reproduces the problem
https://phpstan.org/r/f3779e03-f24f-43e7-8d73-b27973bbd15c
Expected output
The 2nd phpdoc must emit a phpstan error, the type (return type of the
Closure
) does not match the result.The text was updated successfully, but these errors were encountered: