|
| 1 | +<?php |
| 2 | +$finder = PhpCsFixer\Finder::create() |
| 3 | + ->in(__DIR__.'/src') |
| 4 | + ->in(__DIR__.'/tests') |
| 5 | +; |
| 6 | +return PhpCsFixer\Config::create() |
| 7 | + ->setRules([ |
| 8 | + '@PSR2' => true, |
| 9 | + 'array_syntax' => ['syntax' => 'short'], |
| 10 | + 'concat_space' => ['spacing' => 'one'], |
| 11 | + 'new_with_braces' => true, |
| 12 | + 'no_blank_lines_after_phpdoc' => true, |
| 13 | + 'no_empty_phpdoc' => true, |
| 14 | + 'no_empty_comment' => true, |
| 15 | + 'no_leading_import_slash' => true, |
| 16 | + 'no_trailing_comma_in_singleline_array' => true, |
| 17 | + 'no_unused_imports' => true, |
| 18 | + 'ordered_imports' => ['importsOrder' => null, 'sortAlgorithm' => 'alpha'], |
| 19 | + 'phpdoc_add_missing_param_annotation' => ['only_untyped' => true], |
| 20 | + 'phpdoc_align' => true, |
| 21 | + 'phpdoc_no_empty_return' => true, |
| 22 | + 'phpdoc_order' => true, |
| 23 | + 'phpdoc_scalar' => true, |
| 24 | + 'phpdoc_to_comment' => true, |
| 25 | + 'psr0' => false, |
| 26 | + 'psr4' => true, |
| 27 | + 'return_type_declaration' => ['space_before' => 'none'], |
| 28 | + 'single_blank_line_before_namespace' => true, |
| 29 | + 'single_quote' => true, |
| 30 | + 'space_after_semicolon' => true, |
| 31 | + 'ternary_operator_spaces' => true, |
| 32 | + 'trailing_comma_in_multiline_array' => true, |
| 33 | + 'trim_array_spaces' => true, |
| 34 | + 'whitespace_after_comma_in_array' => true, |
| 35 | + ]) |
| 36 | + ->setFinder($finder) |
| 37 | +; |
0 commit comments