Why you would want install Code Sniffer to your PHPStorm? Well, everybody expect from you that your code will be readable and according standards. In this case PSR-2. Code Sniffer will watch your code during programming and tell you that is not according those standards.
- Download the newest Code Sniffer package for PHP.
- Unzip it
- In your PHPStorm navigate to Preferences / PHP / Code Sniffer (or write to Code Sniffer to search field in preferences)
- Add path in PHPStorm from your downloaded package /PHP_CodeSniffer-2.3.0/scripts/phpcs
- In PHPStorm navigate to Code / Inspect code and in Inspection profile section click on open dialog button.
- Followed screen will appear. Just check PHP, and on right side click refresh button and Code Sniffer will load up his profiles. Choose PSR-2. And go repair your code :)


