dejanmarkovic
2/6/2015 - 2:01 AM

Install PHP CodeSniffer on Windows Machine

Install PHP CodeSniffer on Windows Machine

PhpStorm reformat code
-----------------------

PhpStorm now bundles WordPress coding style natively, starting from version 8.
    Go to Project Settings > Code Style > PHP.
    Select Set From... (top right of window) > Predefined Style > WordPress.

Source: https://gist.github.com/Rarst/1370155

Command: 	
ctrl alt l



http://www.xpertdeveloper.com/2014/07/install-php-codesniffer-on-windows-machine/
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
https://confluence.jetbrains.com/display/PhpStorm/WordPress+Development+using+PhpStorm#WordPressDevelopmentusingPhpStorm-PHPCodeSnifferwithWordPressCodingStandardsIntegrationinPhpStorm
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
http://w3guy.com/setup-php-code-sniffer-phpstorm-windows/
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Fixing-Errors-Automatically
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/273

C:\xampp\php\wpcs\vendor\bin\phpcs -s --standard=WordPress C:\xampp\php\wpcs\vendor\bin\functions.php
C:\xampp\php\wpcs\vendor\bin\phpcbf.bat -s --standard=WordPress C:\xampp\php\wpcs\vendor\bin\functions.php