frankverhoeven/coding-standard

FV Coding Standard

Installs: 7 627

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/frankverhoeven/coding-standard

3.0.7 2025-12-01 16:48 UTC

This package is auto-updated.

Last update: 2025-12-01 16:48:44 UTC


README

Set of PHP CS Fixer rules.

Install

Install the package with composer:

composer require frankverhoeven/coding-standard --dev

Configure

Include the rules in your .php-cs-fixer.dist.php configuration:

<?php
declare(strict_types=1);

use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

$finder = PhpCsFixer\Finder::create()
    ->exclude('vendor')
    ->in(__DIR__)
;

return (new PhpCsFixer\Config())
    ->setParallelConfig(ParallelConfigFactory::detect())
    ->setRiskyAllowed(true)
    ->setRules(require __DIR__ . '/vendor/frankverhoeven/coding-standard/rules.php')
    ->setFinder($finder)
    ->setCacheFile(__DIR__ . '.php_cs.cache')
    ;