Skip to content
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

Private methods called with alternative casing are reported as not used #8346

mattschlosser opened this issue Nov 10, 2022 · 1 comment


Copy link

Bug report

PHPStan incorrectly reports a method is not used if it was (accidentally) called with a variant casing.
This could be misleading in the case that someone just accidentally made a typo when calling the method elsewhere.
If the method is reported as not used, I would assume it is safe to delete. Yet if it has been called, just with an alternate casing, this would result in the broken code if the method is removed. The strict rules correctly finds this case; however, they are not included or enabled by default.

Code snippet that reproduces the problem

Expected output

The method is not technically unused.

Did PHPStan help you today? Did it make you happy in any way?

Amazing tool!

Copy link

staabm commented Nov 11, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants