instapro/coding-standard

The Instapro Coding Standard

1.2.0 2024-01-04 14:01 UTC

This package is not auto-updated.

Last update: 2024-12-19 18:22:22 UTC


README

The Instapro Coding Standard is a set of PHP CS Fixer rules that we use in the Instapro projects.

How to use

  1. Install the package as a dev requirement

    composer require --dev instapro/coding-standard
  2. 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'),
    );