webatvantage / php-cs-fixer-config
Provides a GitHub repository template for a configuration factory and rule set factories for friendsofphp/php-cs-fixer.
1.0.2
2025-07-16 11:47 UTC
Requires
- php: ^7.4 || ^8.2
- friendsofphp/php-cs-fixer: ^3.84
This package is not auto-updated.
Last update: 2025-07-16 12:11:06 UTC
README
Installation
Run
composer require --dev webatvantage/php-cs-fixer-config
Usage
Config: .php-cs-fixer.php
<?php declare(strict_types=1); use Webatvantage\PhpCsFixer\Config\Config; $finder = PhpCsFixer\Finder::create() ->in([ __DIR__ . '/src', __DIR__ . '/tests', ]) ->name('*.php') ->ignoreDotFiles(true) ->ignoreVCS(true); return Config::default() ->setFinder($finder);
Additional
Composer format script
{ "scripts": { "format": "vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php" } }