The coding standard of the Broadway project.
$ composer require --dev broadway/coding-standard
- create a
.php-cs-fixer.phpfile referencing the.php-cs-fixer.dist.phptemplate:
# .php-cs-fixer.php <?php $config = require 'vendor/broadway/coding-standard/.php-cs-fixer.dist.php'; $config->setFinder( \PhpCsFixer\Finder::create() ->in([ __DIR__ . '/src', __DIR__ . '/test', ]) ); return $config;
- add
.php_cs.cacheto your.gitignore.
- copy the
.docheader.disttemplate:
cp vendor/broadway/coding-standard/.docheader.dist ./.docheader
- modify the
.docheaderfile is necessary.
$ vendor/bin/php-cs-fixer fix --allow-risky=yes --diff --verbose
$ vendor/bin/docheader check {src,test}