broadway / coding-standard
The coding standard of the Broadway project.
Installs: 2 878
Dependents: 23
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 2
Open Issues: 0
Language:Makefile
Requires
- php: >=7.2
- friendsofphp/php-cs-fixer: ^2.17
- malukenho/docheader: ^0.1.7
README
The coding standard of the Broadway project.
Installation
$ composer require --dev broadway/coding-standard
Configuration
PHP CS fixer
- create a
.php_cs
file referencing the.php_cs.dist
template:
# .php_cs <?php $config = require 'vendor/broadway/coding-standard/.php_cs.dist'; $config->setFinder( \PhpCsFixer\Finder::create() ->in([ __DIR__ . '/src', __DIR__ . '/test', ]) ); return $config;
- add
.php_cs.cache
to your.gitignore
.
docheader
- copy the
.docheader.dist
template:
cp vendor/broadway/coding-standard/.docheader.dist ./.docheader
- modify the
.docheader
file is necessary.
Usage
$ vendor/bin/php-cs-fixer fix --config=".php_cs" --allow-risky=yes --diff --verbose
$ vendor/bin/docheader check {src,test}