php:phpcsfixer
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
php:phpcsfixer [2023/04/29 14:34] – removed - external edit (Unknown date) 127.0.0.1 | php:phpcsfixer [2023/05/29 11:55] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== PHP CS Fixer ====== | ||
+ | |||
+ | The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc., or other community driven ones like the Symfony one. You can also define your (team' | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Install (global): | ||
+ | < | ||
+ | wget https:// | ||
+ | sudo chmod a+x php-cs-fixer | ||
+ | sudo mv php-cs-fixer / | ||
+ | </ | ||
+ | |||
+ | update (global): | ||
+ | < | ||
+ | sudo php-cs-fixer self-update | ||
+ | </ | ||
+ | |||
+ | Usage in dry run mode: | ||
+ | < | ||
+ | php-cs-fixer fix / | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Sublime Text Plugin ===== | ||
+ | |||
+ | Installing Package Control | ||
+ | |||
+ | * The simplest method of installing the Package Control plugin is through Sublime Text itself. | ||
+ | * Open Sublime Text and open the Command Palette... by selecting Command Palette from the Tools pull-down menu. | ||
+ | * In the menu that opens type install which will result in the Install Package Control option being presented. | ||
+ | * Hit Enter or left click the entry to install Package Control. | ||
+ | |||
+ | Installing Packages | ||
+ | |||
+ | * Open the Command Palette... by selecting Command Palette from the Tools pull-down menu. | ||
+ | * In the popup window that appears type Install to search for the install option through Package Control. | ||
+ | * When Package Control: Install Package is highlighted press Return. | ||
+ | * You can use the arrow keys to move the selected option. | ||
+ | |||
+ | Plugin name: "PHP CS Fixer" | ||
+ | |||
+ | Config info: | ||
+ | https:// | ||
+ | |||
+ | |||
+ | ===== VSCode plugins ===== | ||
+ | |||
+ | https:// | ||