josephscott / phpcsfixer-config
0.0.8
2026-10-11 04:35 UTC
Requires
- php: >=8.1
- friendsofphp/php-cs-fixer: 3.95.27
Requires (Dev)
- pestphp/pest: 5.3.1
- phpstan/phpstan: 2.3.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Install
composer require --dev josephscott/phpcsfixer-config
Create a .php-cs-fixer.dist.php in the top level directory of your
repo with:
<?php
declare( strict_types = 1 );
require __DIR__ . '/vendor/autoload.php';
$fixer_config = new JosephScott\PHPCSFixer_Config( __DIR__ );
return $fixer_config->get_config();
If you want to make alterations, all of the rules and options are available
via public attributes on the JosephScott\PHPCSFixer_Config() object. Here
is how you would alter the array_indention rule and the indent config
option:
$fixer_config = new JosephScott\PHPCSFixer_Config( __DIR__ );
$fixer_config->config_indent = ' ';
$fixer_config->rules['array_indention'] = false;
return $fixer_config->get_config();