Incorrect "Unused element" warnings in PhpStorm
On a pretty regular basis, PhpStorm seems to get confused about method usage and starts reporting warnings about unused methods that it clearly “knows” are used.
Typically, “Invalidate caches…” will resolve this for a little while, but it always comes back, so it seems like there might be a problem somewhere that's causing the caches to get messed up.

Please sign in to leave a comment.
Thank you for reaching PhpStorm technical support.
It is not very clear what might be causing this behavior from a screenshot alone.
Could you provide a sample project where this could be reproduced? For example, you can upload it here: https://uploads.jetbrains.com (https://uploads.jetbrains.com/)
Will be waiting for your reply.
No, the project where it most frequently occurs is both enormous and proprietary; I'd be instantly sued into oblivion if I shared it.
Also, it is not a project-specific phenomenon. Since the issue appears related to a corrupt cache, if I were to send you a project where it happened to me immediately after it happened, it would not happen to you unless you worked on that project for some time, possibly a couple of hours. All you could do is respond “looks fine to me.”
If there's anything specific it would be helpful for me to check when the problem occurs to get more information, I would be happy to do that.
Thank you for your reply.
Checking the issue tracker further I found the following issue: https://youtrack.jetbrains.com/issue/WI-68257
Please, check if that's the case and feel free to update/follow it.