1<?php 2 3$finder = PhpCsFixer\Finder::create() 4 ->exclude('PhpParser/Parser') 5 ->in(__DIR__ . '/lib') 6 ->in(__DIR__ . '/test') 7 ->in(__DIR__ . '/grammar') 8; 9 10$config = new PhpCsFixer\Config(); 11return $config->setRiskyAllowed(true) 12 ->setRules([ 13 '@PSR12' => true, 14 // We use PSR12 with consistent brace placement. 15 'curly_braces_position' => [ 16 'functions_opening_brace' => 'same_line', 17 'classes_opening_brace' => 'same_line', 18 ], 19 // declare(strict_types=1) on the same line as <?php. 20 'blank_line_after_opening_tag' => false, 21 'declare_strict_types' => true, 22 // Keep argument formatting for now. 23 'method_argument_space' => ['on_multiline' => 'ignore'], 24 'phpdoc_align' => ['align' => 'left'], 25 'phpdoc_trim' => true, 26 'no_empty_phpdoc' => true, 27 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true], 28 'no_extra_blank_lines' => true, 29 ]) 30 ->setFinder($finder) 31; 32