phpstormphpcodesniffer

Configure PHP CodeSniffer to fix code on the fly in PhpStorm


I have PhpStorm 10 and want to setup php Code Sniffer to automatically correct me code. This article https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm points to "Project Settings | Code Style" and I cannot even find that. I have File | Edit | View | Navigate | Code | Refactor | Run | Tools | VCS | Window | Help at the top and have no idea where to find project settings. I do have File > Settings but cannot figure it out.

My project is a web portal built in Symfony. I saw a colleague run Atom and when he saves a file it is code-fixed on the fly - that is what I want. Help please.


Solution

  • PhpStorm does not support code fixing on the fly with Code Sniffer.

    https://youtrack.jetbrains.com/issue/WI-25815 -- watch this ticket (star/vote/comment) to get notified on any progress.


    Right now, if you wish you may create an External Tools entry for that and run it manually when needed.