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
Static type of enum class is not recognized correctly when used through array_map function. Error appeared after update from 0.12.25 to 0.12.59.
array_map
0.12.25
0.12.59
https://phpstan.org/r/c3cb9d99-758c-4111-8eff-87aeec52ead2
No errors!
The text was updated successfully, but these errors were encountered:
@vitkutny After the latest commit in dev-master, PHPStan now reports different result with your code snippet:
@@ @@ -38: Parameter #1 ...$enums of method Entity::setEnums() expects Enum, static(BaseEnum) given. -43: Parameter #1 $enums of method Entity::setEnumsWithoutSplat() expects array<Enum>, array<int, static(BaseEnum)> given. +No errors
Sorry, something went wrong.
phpstan/phpstan-src@d01431c
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
Static type of enum class is not recognized correctly when used through
array_map
function. Error appeared after update from0.12.25
to0.12.59
.Code snippet that reproduces the problem
https://phpstan.org/r/c3cb9d99-758c-4111-8eff-87aeec52ead2
Expected output
The text was updated successfully, but these errors were encountered: