Created
June 7, 2018 23:27
-
-
Save emir/c50f830e71fdd7968dc2b9286737251e to your computer and use it in GitHub Desktop.
PHP Coding Standards Fixer
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
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 | |
https://cs.sensiolabs.org/ | |
1.0 wget https://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -O php-cs-fixer | |
1.1 sudo chmod a+x php-cs-fixer | |
1.2 sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer | |
veya Composer ile global kurabilirsin: | |
2. composer global require friendsofphp/php-cs-fixer | |
Path tanımlı değilse de: | |
2.1. export PATH="$PATH:$HOME/.composer/vendor/bin" | |
Projenin ana dizininde .php_cs dosyası olduğu için bunu okuyor olacak. | |
Kullanım için projenin ana dizininde php-cs-fixer fix app komutunu tetikleyebilirsin. | |
Unutmadan, .php_cs.cache dosyasını commitlemiyorsun, .gitignore altına ekleyebilirsin. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment