|
| 1 | +<?php |
| 2 | + |
| 3 | +$finder = PhpCsFixer\Finder::create() |
| 4 | + ->exclude('vendor') |
| 5 | + ->in('./') |
| 6 | +; |
| 7 | + |
| 8 | +return PhpCsFixer\Config::create() |
| 9 | + ->setRules([ |
| 10 | + '@PSR2' => true, |
| 11 | + '@PSR1' => true, |
| 12 | + 'array_syntax' => ['syntax' => 'short'], |
| 13 | + 'native_function_invocation' => true, |
| 14 | + 'no_unused_imports' => true, |
| 15 | + 'no_useless_else' => true, |
| 16 | + 'no_useless_return' => true, |
| 17 | + 'no_whitespace_before_comma_in_array' => true, |
| 18 | + 'no_whitespace_in_blank_line' => true, |
| 19 | + 'normalize_index_brace' => true, |
| 20 | + 'ordered_imports' => ['imports_order' => ['class', 'const', 'function']], |
| 21 | + 'trailing_comma_in_multiline_array' => true, |
| 22 | + 'trim_array_spaces' => true, |
| 23 | + 'elseif' => true, |
| 24 | + 'psr4' => true, |
| 25 | + 'short_scalar_cast' => true, |
| 26 | + 'single_blank_line_before_namespace' => true, |
| 27 | + 'cast_spaces' => ['space' => 'none'], |
| 28 | + 'modernize_types_casting' => true, |
| 29 | + 'declare_strict_types' => true, |
| 30 | + 'phpdoc_scalar' => true, |
| 31 | + 'phpdoc_separation' => true, |
| 32 | + ]) |
| 33 | + ->setRiskyAllowed(true) |
| 34 | + ->setFinder($finder) |
| 35 | +; |
0 commit comments