|
| 1 | +<?php |
| 2 | + |
| 3 | +$finder = PhpCsFixer\Finder::create() |
| 4 | + ->exclude('vendor') |
| 5 | + ->exclude('var/cache') |
| 6 | + ->in(__DIR__); |
| 7 | + |
| 8 | +$config = new PhpCsFixer\Config(); |
| 9 | +return $config->setRules([ |
| 10 | + 'concat_space' => ['spacing' => 'one'], |
| 11 | + 'declare_equal_normalize' => ['space' => 'none'], |
| 12 | + 'is_null' => true, |
| 13 | + 'modernize_types_casting' => true, |
| 14 | + 'ordered_imports' => true, |
| 15 | + 'php_unit_construct' => true, |
| 16 | + 'single_line_comment_style' => true, |
| 17 | + 'yoda_style' => false, |
| 18 | + '@PSR2' => true, |
| 19 | + 'array_syntax' => ['syntax' => 'short'], |
| 20 | + 'blank_line_after_opening_tag' => true, |
| 21 | + 'blank_line_before_statement' => true, |
| 22 | + 'cast_spaces' => true, |
| 23 | + 'declare_strict_types' => true, |
| 24 | + 'type_declaration_spaces' => true, |
| 25 | + 'include' => true, |
| 26 | + 'lowercase_cast' => true, |
| 27 | + 'new_with_parentheses' => true, |
| 28 | + 'no_extra_blank_lines' => true, |
| 29 | + 'no_leading_import_slash' => true, |
| 30 | + 'echo_tag_syntax' => true, |
| 31 | + 'no_unused_imports' => true, |
| 32 | + 'no_useless_else' => true, |
| 33 | + 'no_useless_return' => true, |
| 34 | + 'phpdoc_order' => true, |
| 35 | + 'phpdoc_scalar' => true, |
| 36 | + 'phpdoc_types' => true, |
| 37 | + 'short_scalar_cast' => true, |
| 38 | + 'blank_lines_before_namespace' => true, |
| 39 | + 'single_quote' => true, |
| 40 | + 'trailing_comma_in_multiline' => true, |
| 41 | + ]) |
| 42 | + ->setRiskyAllowed(true) |
| 43 | + ->setFinder($finder); |
0 commit comments