-
-
Notifications
You must be signed in to change notification settings - Fork 887
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 with array_key_exists and cast to array #3821
Comments
@keksa After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
- 9: Call to function array_key_exists() with string and array() will always evaluate to false.
+-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
|
@keksa After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-9: Call to function array_key_exists() with string and array() will always evaluate to false.
+9: Call to function array_key_exists() with string and array{} will always evaluate to false. Full report
|
@keksa After the latest push in 1.8.x, PHPStan now reports different result with your code snippet: @@ @@
-9: Call to function array_key_exists() with string and array() will always evaluate to false.
+No errors |
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
Code snippet that reproduces the problem
https://phpstan.org/r/74a191d3-489d-430c-adcc-2be1bd1775da
Expected output
no issues
The text was updated successfully, but these errors were encountered: