Last active
August 29, 2015 14:14
-
-
Save dejanmarkovic/c26afe1d024e27858aab to your computer and use it in GitHub Desktop.
Install PHP CodeSniffer on Windows Machine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment