broadway/coding-standard
Opinionated PHP_CodeSniffer rules used at Broadway to enforce consistent, modern PHP style across projects. Easy to install and run in CI to catch formatting and code quality issues early, helping teams keep codebases clean and uniform.
The coding standard of the Broadway project.
$ composer require --dev broadway/coding-standard
.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;
.php_cs.cache to your .gitignore..docheader.dist template:cp vendor/broadway/coding-standard/.docheader.dist ./.docheader
.docheader file is necessary.$ vendor/bin/php-cs-fixer fix --allow-risky=yes --diff --verbose
$ vendor/bin/docheader check {src,test}
How can I help you explore Laravel packages today?