We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given an array of anonymous functions, when called by a variable as an index, PHPStan will say invoked with more parameters than required.
This seems to only happen when the functions have return statements
https://phpstan.org/r/457fc68b-2155-441f-8e06-ce502c914429
No issues should be detected.
Without return statements no errors flagged: https://phpstan.org/r/af3a2d19-91dc-4e32-8a7f-dacafce7f3d5
Seems to also depend on the order of the items in the array - it takes the first function only: First function with 2 params: https://phpstan.org/r/176fd1de-e513-40b4-9cd3-f03c5ad19bac First function with 1 param: https://phpstan.org/r/08c60ad3-6a2c-4d20-b492-b7c37bab40b0
No response
The text was updated successfully, but these errors were encountered:
This is very similar to #9594
Sorry, something went wrong.
Oh, it's different, sorry.
Fixed: phpstan/phpstan-src#2902
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.
No branches or pull requests
Bug report
Given an array of anonymous functions, when called by a variable as an index, PHPStan will say invoked with more parameters than required.
This seems to only happen when the functions have return statements
Code snippet that reproduces the problem
https://phpstan.org/r/457fc68b-2155-441f-8e06-ce502c914429
Expected output
No issues should be detected.
Without return statements no errors flagged: https://phpstan.org/r/af3a2d19-91dc-4e32-8a7f-dacafce7f3d5
Seems to also depend on the order of the items in the array - it takes the first function only:
First function with 2 params: https://phpstan.org/r/176fd1de-e513-40b4-9cd3-f03c5ad19bac
First function with 1 param: https://phpstan.org/r/08c60ad3-6a2c-4d20-b492-b7c37bab40b0
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: