Skip to content

Instantly share code, notes, and snippets.

@dejanmarkovic
Last active August 29, 2015 14:14
Show Gist options
  • Save dejanmarkovic/c26afe1d024e27858aab to your computer and use it in GitHub Desktop.
Save dejanmarkovic/c26afe1d024e27858aab to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment