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
No checks for array_map closure params #1954
Labels
Comments
Yeah, I plan to support this once generics are implemented. |
This was referenced Apr 28, 2021
@muglug After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-No errors
+4: Parameter #1 $callback of function array_map expects callable(1|stdClass): mixed, Closure(string): string given. Full report
|
Looks fixed now! |
ondrejmirtes
added a commit
to phpstan/phpstan-src
that referenced
this issue
Sep 12, 2021
Closes phpstan/phpstan#5356 Closes phpstan/phpstan#1954
mglaman
pushed a commit
to mglaman/phpstan-src
that referenced
this issue
Oct 7, 2021
Closes phpstan/phpstan#5356 Closes phpstan/phpstan#1954
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected: argument passed to first arg of
array_map
is wrongActual: No issues
https://phpstan.org/r/15291a0f-d267-4eec-87d3-61ef0803df57
Would have flagged this code:
phpstan/src/Testing/RuleTestCase.php
Lines 128 to 133 in 48724f8
which expects is passed
string[]|\PHPStan\Analyser\Error[]
The text was updated successfully, but these errors were encountered: