|
1 | 1 | <?php
|
2 | 2 |
|
3 |
| -$finder = Symfony\CS\Finder\DefaultFinder::create() |
| 3 | +$finder = \PhpCsFixer\Finder::create() |
4 | 4 | ->in(__DIR__ . '/src')
|
5 | 5 | ->in(__DIR__ . '/tests');
|
6 | 6 |
|
7 |
| -return Symfony\CS\Config\Config::create() |
8 |
| - ->fixers([ |
9 |
| - 'align_double_arrow', |
10 |
| - 'concat_with_spaces', |
11 |
| - 'ereg_to_preg', |
12 |
| - 'multiline_spaces_before_semicolon', |
13 |
| - 'newline_after_open_tag', |
14 |
| - 'ordered_use', |
15 |
| - 'php4_constructor', |
16 |
| - 'php_unit_construct', |
17 |
| - 'php_unit_strict', |
18 |
| - 'short_array_syntax', |
19 |
| - 'strict', |
20 |
| - 'strict_param', |
| 7 | +return \PhpCsFixer\Config::create() |
| 8 | + ->setRules([ |
| 9 | + '@PSR2' => true, |
21 | 10 |
|
22 |
| - '-concat_without_spaces', |
23 |
| - '-linefeed', |
24 |
| - '-phpdoc_no_empty_return', |
25 |
| - '-phpdoc_params', |
26 |
| - '-phpdoc_separation', |
27 |
| - '-pre_increment', |
28 |
| - '-unalign_double_arrow', |
29 |
| - '-unary_operators_spaces', |
| 11 | + 'array_syntax' => [ |
| 12 | + 'syntax' => 'short' |
| 13 | + ], |
| 14 | + 'binary_operator_spaces' => [ |
| 15 | + 'align_double_arrow' => null, |
| 16 | + 'align_equals' => false, |
| 17 | + ], |
| 18 | + 'blank_line_after_opening_tag' => true, |
| 19 | + 'cast_spaces' => true, |
| 20 | + 'combine_consecutive_unsets' => true, |
| 21 | + 'concat_space' => [ |
| 22 | + 'spacing' => 'one' |
| 23 | + ], |
| 24 | + 'declare_equal_normalize' => true, |
| 25 | + 'dir_constant' => true, |
| 26 | + 'ereg_to_preg' => true, |
| 27 | + 'function_to_constant' => true, |
| 28 | + 'function_typehint_space' => true, |
| 29 | + 'hash_to_slash_comment' => true, |
| 30 | + 'heredoc_to_nowdoc' => true, |
| 31 | + 'include' => true, |
| 32 | + 'is_null' => true, |
| 33 | + 'lowercase_cast' => true, |
| 34 | + 'magic_constant_casing' => true, |
| 35 | + 'method_separation' => true, |
| 36 | + 'modernize_types_casting' => true, |
| 37 | + 'native_function_casing' => true, |
| 38 | + 'new_with_braces' => true, |
| 39 | + 'no_alias_functions' => true, |
| 40 | + 'no_blank_lines_after_class_opening' => true, |
| 41 | + 'no_blank_lines_after_phpdoc' => true, |
| 42 | + 'no_empty_comment' => true, |
| 43 | + 'no_empty_phpdoc' => true, |
| 44 | + 'no_empty_statement' => true, |
| 45 | + 'no_extra_consecutive_blank_lines' => true, |
| 46 | + 'no_leading_import_slash' => 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_short_bool_cast' => true, |
| 53 | + 'no_singleline_whitespace_before_semicolons' => true, |
| 54 | + 'no_spaces_around_offset' => true, |
| 55 | + 'no_trailing_comma_in_list_call' => true, |
| 56 | + 'no_trailing_comma_in_singleline_array' => true, |
| 57 | + 'no_unneeded_control_parentheses' => true, |
| 58 | + 'no_unused_imports' => 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 | + 'normalize_index_brace' => true, |
| 64 | + 'object_operator_without_whitespace' => true, |
| 65 | + 'ordered_class_elements' => [ |
| 66 | + 'order' => ['use_trait', 'constant', 'property', 'construct', 'method'], |
| 67 | + ], |
| 68 | + 'ordered_imports' => true, |
| 69 | + 'php_unit_construct' => true, |
| 70 | + 'php_unit_dedicate_assert' => true, |
| 71 | + 'php_unit_strict' => true, |
| 72 | + 'phpdoc_add_missing_param_annotation' => true, |
| 73 | + 'phpdoc_annotation_without_dot' => true, |
| 74 | + 'phpdoc_indent' => true, |
| 75 | + 'phpdoc_inline_tag' => true, |
| 76 | + 'phpdoc_no_access' => true, |
| 77 | + 'phpdoc_no_alias_tag' => true, |
| 78 | + 'phpdoc_no_package' => true, |
| 79 | + 'phpdoc_scalar' => true, |
| 80 | + 'phpdoc_single_line_var_spacing' => true, |
| 81 | + 'phpdoc_summary' => true, |
| 82 | + 'phpdoc_trim' => true, |
| 83 | + 'phpdoc_types' => true, |
| 84 | + 'phpdoc_var_without_name' => true, |
| 85 | + 'pow_to_exponentiation' => true, |
| 86 | + 'psr4' => true, |
| 87 | + 'return_type_declaration' => true, |
| 88 | + 'self_accessor' => true, |
| 89 | + 'short_scalar_cast' => true, |
| 90 | + 'single_blank_line_before_namespace' => true, |
| 91 | + 'single_quote' => true, |
| 92 | + 'space_after_semicolon' => true, |
| 93 | + 'standardize_not_equals' => true, |
| 94 | + 'strict_comparison' => true, |
| 95 | + 'strict_param' => true, |
| 96 | + 'ternary_operator_spaces' => true, |
| 97 | + 'trailing_comma_in_multiline_array' => true, |
| 98 | + 'trim_array_spaces' => true, |
| 99 | + 'whitespace_after_comma_in_array' => true, |
30 | 100 | ])
|
31 |
| - ->finder($finder); |
| 101 | + ->setFinder($finder); |
0 commit comments