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
After update to 0.12.51 all my classes with implemented Countable report issue:
Return type (int) of method SomeClass::count() should be covariant with return type (int<0, max>) of method Countable::count()
It appear when strict mode it's enabled.
https://phpstan.org/r/02ca7893-6eb0-4318-9e74-5a6a0e0d5d2f
No error or idea how to resolve this.
The text was updated successfully, but these errors were encountered:
This works as a workaround: https://phpstan.org/r/2073aeda-dd5f-4af2-b403-9733c3117817
but I would expect this to be inherited from Countable's PHPDoc, like it is for any userland interface... https://phpstan.org/r/da649756-6fd9-4b6f-8787-4274532e48d0
Countable
Sorry, something went wrong.
Fixed: phpstan/phpstan-src@fb8d3ef
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
After update to 0.12.51 all my classes with implemented Countable report issue:
It appear when strict mode it's enabled.
Code snippet that reproduces the problem
https://phpstan.org/r/02ca7893-6eb0-4318-9e74-5a6a0e0d5d2f
Expected output
No error or idea how to resolve this.
The text was updated successfully, but these errors were encountered: