PHPStorm has a handy unused private method inspection, which detects methods that are without doubt not used.
I would sometimes be interested to scan my project for unused public/protected methods as well. I'm aware that this is not an exact science, and that would report methods that might be used outside this project (in the case of a library, for example), but subject to a manual review, that would probably be very useful.
Is this currently possible with PHPStorm?
It's possible in PHPStorm 7/8. Go to Code > Inspect Code and use a custom inspection profile. In the Inspections window, click on Add and unselect everything except PHP > Unused. That's only the unused private method I mention.
In newer versions of IntelliJ it's under Code -> Analyze Code -> Run Inspection by Name. Show activity on this post.
It's not possible with PhpStorm 6. Here is a snapshot of the Project Settings (where you can set those options):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With