dflydev / php-coding-standards
This repository contains the coding standards used by Dragonfly team.
Installs: 787
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/dflydev/php-coding-standards
Requires
- php: ~8.0.0 || ~8.1.0 || ~8.2.0
- ext-filter: *
- ergebnis/php-cs-fixer-config: ^5.5
- friendsofphp/php-cs-fixer: ~3.16.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.30.2
- ergebnis/license: ^2.1
This package is auto-updated.
Last update: 2025-09-24 02:15:26 UTC
README
Usage
composer require dflydev/php-coding-standards
Create a new .php-cs-fixer.dist.php
file and within it add the following:
use Ergebnis\PhpCsFixer\Config; $config = Config\Factory::fromRuleSet(new Dflydev\PhpCsFixer\Config\RuleSet\Dflydev()); $config->getFinder()->in(__DIR__); $config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache'); return $config;
Configuration with override rules
💡 Optionally override rules from a rule set by passing in an array of rules to be merged in:
use Ergebnis\PhpCsFixer\Config; $config = Config\Factory::fromRuleSet(new Dflydev\PhpCsFixer\Config\RuleSet\Dflydev(), [ 'mb_str_functions' => false, 'strict_comparison' => false, ]); $config->getFinder()->in(__DIR__); $config->setCacheFile(__DIR__ . '/.php-cs-fixer.cache'); return $config;