The Instapro Coding Standard is a set of PHP CS Fixer rules that we use in the Instapro projects.
-
Install the package as a dev requirement
composer require --dev instapro/coding-standard
-
Add/update your
.php-cs-fixer.dist.php
configuration file to load the configuration from the package. Be sure to update the finder configuration to match the files you want to enforce the coding standard for.<?php declare(strict_types=1); use Instapro\CodingStandard\Load; return Load::configuration( PhpCsFixer\Finder::create() ->exclude('Files') ->in([ __DIR__ . '/src', __DIR__ . '/tests', ]) ->name('*.php'), );