|
| 1 | +<?php |
| 2 | + |
| 3 | +$finder = PhpCsFixer\Finder::create(); |
| 4 | + |
| 5 | +return PhpCsFixer\Config::create() |
| 6 | + ->setRules([ |
| 7 | + '@PSR2' => true, |
| 8 | + '@Symfony' => true, |
| 9 | + 'align_multiline_comment' => true, |
| 10 | + 'array_syntax' => ['syntax' => 'short'], |
| 11 | + 'binary_operator_spaces' => [ |
| 12 | + 'default' => 'align_single_space_minimal', |
| 13 | + 'operators' => [ |
| 14 | + '=' =>'align_single_space_minimal', |
| 15 | + '=>' =>'align_single_space_minimal' |
| 16 | + ] |
| 17 | + ], |
| 18 | + 'blank_line_after_namespace' => true, |
| 19 | + 'blank_line_before_statement' => false, |
| 20 | + 'braces' => true, |
| 21 | + 'class_definition' => true, |
| 22 | + 'class_keyword_remove' => true, |
| 23 | + 'combine_consecutive_issets' => true, |
| 24 | + 'combine_consecutive_unsets' => true, |
| 25 | + 'concat_space' => true, |
| 26 | + 'dir_constant' => true, |
| 27 | + 'elseif' => true, |
| 28 | + 'encoding' => true, |
| 29 | + 'full_opening_tag' => true, |
| 30 | + 'function_declaration' => true, |
| 31 | + 'function_typehint_space' => true, |
| 32 | + 'is_null' => true, |
| 33 | + 'line_ending' => true, |
| 34 | + 'lowercase_constants' => true, |
| 35 | + 'lowercase_keywords' => true, |
| 36 | + 'mb_str_functions' => true, |
| 37 | + 'method_argument_space' => true, |
| 38 | + 'method_separation' => true, |
| 39 | + 'native_function_casing' => true, |
| 40 | + 'no_alias_functions' => true, |
| 41 | + 'no_blank_lines_after_class_opening' => true, |
| 42 | + 'no_blank_lines_after_phpdoc' => true, |
| 43 | + 'no_closing_tag' => true, |
| 44 | + 'no_empty_comment' => true, |
| 45 | + 'no_empty_statement' => true, |
| 46 | + 'no_extra_consecutive_blank_lines' => true, |
| 47 | + 'no_leading_namespace_whitespace' => true, |
| 48 | + 'no_mixed_echo_print' => true, |
| 49 | + 'no_multiline_whitespace_around_double_arrow' => true, |
| 50 | + 'no_multiline_whitespace_before_semicolons' => true, |
| 51 | + 'no_php4_constructor' => true, |
| 52 | + 'no_singleline_whitespace_before_semicolons' => true, |
| 53 | + 'no_superfluous_elseif' => true, |
| 54 | + 'no_trailing_whitespace' => true, |
| 55 | + 'no_trailing_whitespace_in_comment' => true, |
| 56 | + 'no_unneeded_curly_braces' => true, |
| 57 | + 'no_unused_imports' => true, |
| 58 | + 'no_useless_else' => true, |
| 59 | + 'no_useless_return' => true, |
| 60 | + 'no_whitespace_before_comma_in_array' => true, |
| 61 | + 'no_whitespace_in_blank_line' => true, |
| 62 | + 'non_printable_character' => true, |
| 63 | + 'object_operator_without_whitespace' => true, |
| 64 | + 'ordered_class_elements' => true, |
| 65 | + 'ordered_imports' => true, |
| 66 | + 'phpdoc_align' => true, |
| 67 | + 'phpdoc_order' => true, |
| 68 | + 'phpdoc_scalar' => true, |
| 69 | + 'protected_to_private' => true, |
| 70 | + 'return_type_declaration' => ['space_before' => 'one'], |
| 71 | + 'short_scalar_cast' => true, |
| 72 | + 'single_blank_line_at_eof' => true, |
| 73 | + 'single_blank_line_before_namespace' => true, |
| 74 | + 'single_line_after_imports' => true, |
| 75 | + 'single_quote' => true, |
| 76 | + 'trim_array_spaces' => true, |
| 77 | + 'whitespace_after_comma_in_array' => true, |
| 78 | + ]) |
| 79 | + ->setFinder($finder); |
0 commit comments