-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
False positive "Call to function is_array() with mixed will always evaluate to true." #4999
Comments
Fixed: phpstan/phpstan-src@187921e |
Hi @ondrejmirtes 👋 😃 Do you think it may be related? If not, I can open a distinct issue for more clarity. |
@tugmaks After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-13: Call to function is_array() with mixed will always evaluate to true.
+No errors |
@tugmaks After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-13: Call to function is_array() with mixed will always evaluate to true.
+-1: Internal error: PHPStan\Rules\Methods\WrongCaseOfInheritedMethodRule::findMethod(): Argument #2 ($classReflection) must be of type PHPStan\Reflection\ClassReflection, null given, called in /var/task/vendor/phpstan/phpstan-strict-rules/src/Rules/Methods/WrongCaseOfInheritedMethodRule.php on line 40
+Run PHPStan with --debug option and post the stack trace to:
+https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md Full report
|
@tugmaks After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-13: Call to function is_array() with mixed will always evaluate to true.
+19: Method HelloWorld::parsePhone() should return string|null but return statement is missing.
+19: Static method HelloWorld::parsePhone() is unused. Full report
|
@ondrejmirtes this one seems fixed and regression test is already committed in https://github.com/phpstan/phpstan-src/blob/1.9.x/tests/PHPStan/Rules/Comparison/data/bug-4999.php |
Thanks! |
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
After bumping phpstan/phpstan from 0.12.86 to 0.12.87
Code snippet that reproduces the problem
https://phpstan.org/r/f44414ae-c1bd-436f-898d-6270c5a39268
Expected output
no errors
The text was updated successfully, but these errors were encountered: