|
| 1 | +<?php |
| 2 | + |
| 3 | +$finder = (new PhpCsFixer\Finder()) |
| 4 | + ->in('src') |
| 5 | +; |
| 6 | + |
| 7 | +return (new PhpCsFixer\Config()) |
| 8 | + ->setRiskyAllowed(true) |
| 9 | + ->setRules([ |
| 10 | + '@PHP81Migration' => true, |
| 11 | + '@PHP80Migration:risky' => true, |
| 12 | + '@PHPUnit84Migration:risky' => true, |
| 13 | + '@PSR1' => true, |
| 14 | + '@PSR12' => true, |
| 15 | + '@PhpCsFixer' => true, |
| 16 | + '@Symfony' => true, |
| 17 | + 'ternary_to_elvis_operator' => true, |
| 18 | + 'set_type_to_cast' => true, |
| 19 | + 'self_accessor' => true, |
| 20 | + 'psr_autoloading' => true, |
| 21 | + 'php_unit_test_annotation' => ['style' => 'annotation'], |
| 22 | + 'php_unit_set_up_tear_down_visibility' => true, |
| 23 | + 'php_unit_construct' => true, |
| 24 | + 'no_useless_sprintf' => true, |
| 25 | + 'no_homoglyph_names' => true, |
| 26 | + 'native_function_invocation' => true, |
| 27 | + 'native_constant_invocation' => true, |
| 28 | + 'modernize_types_casting' => true, |
| 29 | + 'logical_operators' => true, |
| 30 | + 'is_null' => true, |
| 31 | + 'function_to_constant' => true, |
| 32 | + 'fopen_flag_order' => true, |
| 33 | + 'error_suppression' => true, |
| 34 | + 'ereg_to_preg' => true, |
| 35 | + 'dir_constant' => true, |
| 36 | + ]) |
| 37 | + ->setFinder($finder) |
| 38 | + ->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line |
| 39 | +; |
0 commit comments