frankverhoeven/coding-standard

FV Coding Standard

Maintainers

Package info

github.com/frankverhoeven/coding-standard

Homepage

pkg:composer/frankverhoeven/coding-standard

Statistics

Installs: 7 916

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

3.0.9 2026-04-12 15:17 UTC

This package is auto-updated.

Last update: 2026-04-12 15:17:22 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')
    ;