|
| 1 | +<?php |
| 2 | + |
| 3 | +$finder = PhpCsFixer\Finder::create() |
| 4 | + ->in(__DIR__ . '/src') |
| 5 | + ->in(__DIR__ . '/tests'); |
| 6 | + |
| 7 | +return PhpCsFixer\Config::create() |
| 8 | + ->setRules([ |
| 9 | + 'array_indentation' => true, |
| 10 | + 'array_syntax' => ['syntax' => 'short'], |
| 11 | + 'blank_line_after_opening_tag' => true, |
| 12 | + 'concat_space' => ['spacing' => 'one'], |
| 13 | + 'declare_strict_types' => true, |
| 14 | + 'increment_style' => ['style' => 'post'], |
| 15 | + 'is_null' => ['use_yoda_style' => false], |
| 16 | + 'list_syntax' => ['syntax' => 'short'], |
| 17 | + 'method_argument_space' => ['ensure_fully_multiline' => true], |
| 18 | + 'method_chaining_indentation' => true, |
| 19 | + 'modernize_types_casting' => true, |
| 20 | + 'no_multiline_whitespace_before_semicolons' => true, |
| 21 | + 'no_superfluous_elseif' => true, |
| 22 | + 'no_superfluous_phpdoc_tags' => true, |
| 23 | + 'no_unused_imports' => true, |
| 24 | + 'no_useless_else' => true, |
| 25 | + 'no_useless_return' => true, |
| 26 | + 'ordered_imports' => true, |
| 27 | + 'phpdoc_align' => false, |
| 28 | + 'phpdoc_order' => true, |
| 29 | + 'php_unit_construct' => true, |
| 30 | + 'php_unit_dedicate_assert' => true, |
| 31 | + 'return_assignment' => true, |
| 32 | + 'single_blank_line_at_eof' => true, |
| 33 | + 'single_line_comment_style' => true, |
| 34 | + 'ternary_to_null_coalescing' => true, |
| 35 | + 'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false], |
| 36 | + ]) |
| 37 | + ->setFinder($finder) |
| 38 | + ->setUsingCache(true) |
| 39 | + ->setRiskyAllowed(true); |
0 commit comments