Features Releases

Simplified CodeSniffer and MessDetector Setup

PHP Code Sniffer and PHP Mess Detector are the proven tools for ensuring that your code is clean, consistent, and conforming to the chosen coding standards.

In PhpStorm 2018.2, we’ve simplified setting up of these tools to the point that almost no setup is actually required. The paths to Code Sniffer and Mess Detector are now automatically detected from composer.json – in the same way as it happens for PHPUnit or Behat.

To set up these tools in a project, you only need declare them as dependencies in composer.json and run Install:


To start inspecting code, locate and enable the corresponding inspections under Preferences | Editor | Inspections | PHP | Quality Tools.

For PHPCS, though, you can alternatively provide the desired ruleset in the scripts section of composer.json. PhpStorm in this case will enable the corresponding inspection and select the provided coding standard for it automatically:


Similar functionality is coming for PHPMD, too, of course. Stay tuned!

Your JetBrains PhpStorm Team
The Drive to Develop

image description