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

Unused method not found in the analysis. #7389

Closed
eliamariutti opened this issue Jun 3, 2022 · 3 comments · Fixed by phpstan/phpstan-src#1404
Closed

Unused method not found in the analysis. #7389

eliamariutti opened this issue Jun 3, 2022 · 3 comments · Fixed by phpstan/phpstan-src#1404
Labels
Milestone

Comments

@eliamariutti
Copy link

PHPStan fail to detect unused methods.

Code snippet that reproduces the problem
https://phpstan.org/r/ec096166-959b-4a45-906c-b43b84b3503d

Expected output

Line	Error
9	Method HelloWorld::getTest() is unused.
20	Method HelloWorld::getTest1() is unused.

Notes

If we edit the first function to return only ONE string
https://phpstan.org/r/836038c0-c7f9-4bcd-9894-63fb7cec137a
the errors are detected successfully.

@ondrejmirtes
Copy link
Member

Oh I'm intrigued! Maybe @herndlm could debug that :) And please @herndlm tell me if you don't want to be cc'ed on these issues, but I know the right people for several areas in PHPStan that they can orient well in so I tell them :)

@ondrejmirtes ondrejmirtes added this to the Easy fixes milestone Jun 3, 2022
@herndlm
Copy link
Contributor

herndlm commented Jun 7, 2022

oh god what's going on here 😅
but sure, I'll look at this. It's also fine if you tag me directly @ondrejmirtes, no worries

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants