PHP-Parser/.php-cs-fixer.dist.php
Nikita Popov a5033e3860 Format tests as well
The unnecessary parentheses for "new" are a bit annoying, but I
can live with it...
2022-08-29 21:52:53 +02:00

26 lines
759 B
PHP

<?php
$finder = PhpCsFixer\Finder::create()
->exclude('PhpParser/Parser')
->in(__DIR__ . '/lib')
->in(__DIR__ . '/test')
;
$config = new PhpCsFixer\Config();
return $config->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
// We use PSR12 with consistent brace placement.
'curly_braces_position' => [
'functions_opening_brace' => 'same_line',
'classes_opening_brace' => 'same_line',
],
// declare(strict_types=1) on the same line as <?php.
'blank_line_after_opening_tag' => false,
'declare_strict_types' => true,
// Keep argument formatting for now.
'method_argument_space' => ['on_multiline' => 'ignore'],
])
->setFinder($finder)
;