Open yepes opened 5 years ago
I have the same problem. It (mostly?) affects action methods in controllers - they are obviously never called directly from within the code, but only executed when a user (HTTP) request is routed to the method.
To remove the inspection only for one action, you just put this before the method: /* @noinspection PhpUnused /
You can also use it before the class definition, so it removes the inspection for every inspection.
Hey guys,
With the new version of PHP Storm I'm getting tons of "Unused Element" for the Controller Class declaration and for the methods inside those classes. It's a bit annoying. I don't know if that's something that could be avoided using this plugin or not. I mean, I don't wanna turn completely off the inspection in the IDE
This is from a freshly created basic app template:
What steps will reproduce the problem?
Install the latests PHP Storm version
What is the expected result?
Do not throw the Unused Element.
What do you get instead?
Unused Element
Additional info