apeschar / php-cs-fixer
Installs: 13 617
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
This package is auto-updated.
Last update: 2024-10-16 15:43:03 UTC
README
This is to keep my rules for PHP-CS-Fixer in one place, so that changing them affects all projects.
It also uses git ls-files '*.php'
to list target files instead of Symfony's
finder. This is much faster and automatically avoids files that are not
versioned.
Installation
Install PHP-CS-Fixer and this package in a subdirectory of your project:
mkdir -p tools/php-cs-fixer
composer --working-dir=tools/php-cs-fixer \
require friendsofphp/php-cs-fixer apeschar/php-cs-fixer
Initialize the .php-cs-fixer.dist.php
:
cat > .php-cs-fixer.dist.php <<EOF
<?php
use Kibo\PhpCsFixer\Factory;
return (new Factory(__DIR__))->config();
EOF
Run php-cs-fixer
:
tools/php-cs-fixer/vendor/bin/php-cs-fixer fix