The coding standard of the Broadway project.
$ composer require --dev broadway/coding-standard
- create a
.php-cs-fixer.php
file referencing the.php-cs-fixer.dist.php
template:
# .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.cache
to your.gitignore
.
- copy the
.docheader.dist
template:
cp vendor/broadway/coding-standard/.docheader.dist ./.docheader
- modify the
.docheader
file is necessary.
$ vendor/bin/php-cs-fixer fix --allow-risky=yes --diff --verbose
$ vendor/bin/docheader check {src,test}