Installation instruction:
-
Install PHP CodeSniffer according to instruction found here:
-
Find PEAR directory:
pear config-show | grep php_dir -
Checkout this two repos to folder
/path/to/pear/PHP/CodeSniffer/Standards:git clone git://github.com/opensky/Symfony2-coding-standard.git Symfony2 git clone git://github.com/gellu/ZL-coding-standard ZL -
Set ZL as default coding standard:
phpcs --config-set default_standard ZL -
Set
tabcharacter for indent instead of spacesphpcs --config-set tab_width 4 -
Go to
PHPStorm -> Preferencesand use search with phrasecode snifferto findPHP Code Sniffer validation. Set path to phpcs and chooseZLstandard as current. Apply. -
Done :)