Skip to content

Instantly share code, notes, and snippets.

@kitzberger
Last active February 18, 2021 13:25
Show Gist options
  • Save kitzberger/55fbb6c76d35d6db1055621e08c39a80 to your computer and use it in GitHub Desktop.
Save kitzberger/55fbb6c76d35d6db1055621e08c39a80 to your computer and use it in GitHub Desktop.
PHP CS Fixer
function git-php-cs-fixer() {
files=$(git ls-files \*.php)
for file in $files
do
php-cs-fixer fix --rules=@PSR12 -- $file
done
}
# install php cs fixer
composer require --global friendsofphp/php-cs-fixer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment