|
3 | 3 | use PhpCsFixer\Finder;
|
4 | 4 |
|
5 | 5 | $rules = [
|
| 6 | + '@PSR12' => true, |
6 | 7 | 'array_syntax' => ['syntax' => 'short'],
|
7 | 8 | 'binary_operator_spaces' => [
|
8 | 9 | 'default' => 'single_space',
|
|
13 | 14 | 'blank_line_before_statement' => [
|
14 | 15 | 'statements' => ['return'],
|
15 | 16 | ],
|
16 |
| - 'braces' => true, |
17 | 17 | 'cast_spaces' => true,
|
18 |
| - 'class_definition' => true, |
19 | 18 | 'class_attributes_separation' => [
|
20 | 19 | 'elements' => [
|
21 | 20 | 'trait_import' => 'none',
|
22 | 21 | ],
|
23 | 22 | ],
|
| 23 | + 'class_definition' => true, |
24 | 24 | 'concat_space' => [
|
25 | 25 | 'spacing' => 'one',
|
26 | 26 | ],
|
| 27 | + 'control_structure_braces' => true, |
| 28 | + 'control_structure_continuation_position' => true, |
27 | 29 | 'declare_equal_normalize' => true,
|
| 30 | + 'declare_parentheses' => true, |
28 | 31 | 'elseif' => true,
|
29 | 32 | 'encoding' => true,
|
30 | 33 | 'full_opening_tag' => true,
|
31 |
| - 'fully_qualified_strict_types' => true, |
| 34 | + 'fully_qualified_strict_types' => false, |
32 | 35 | 'function_declaration' => true,
|
33 |
| - 'function_typehint_space' => true, |
34 | 36 | 'heredoc_to_nowdoc' => true,
|
35 | 37 | 'include' => true,
|
36 | 38 | 'increment_style' => ['style' => 'post'],
|
37 | 39 | 'indentation_type' => true,
|
38 |
| - 'linebreak_after_opening_tag' => true, |
39 | 40 | 'line_ending' => true,
|
| 41 | + 'linebreak_after_opening_tag' => true, |
40 | 42 | 'lowercase_cast' => true,
|
41 | 43 | 'lowercase_keywords' => true,
|
42 | 44 | 'lowercase_static_reference' => true,
|
43 |
| - 'magic_method_casing' => true, |
44 | 45 | 'magic_constant_casing' => true,
|
| 46 | + 'magic_method_casing' => true, |
45 | 47 | 'method_argument_space' => true,
|
| 48 | + 'multiline_whitespace_before_semicolons' => [ |
| 49 | + 'strategy' => 'no_multi_line', |
| 50 | + ], |
46 | 51 | 'native_function_casing' => true,
|
47 | 52 | 'no_alias_functions' => true,
|
48 |
| - 'no_extra_blank_lines' => [ |
49 |
| - 'tokens' => [ |
50 |
| - 'extra', |
51 |
| - 'throw', |
52 |
| - 'use', |
53 |
| - ], |
54 |
| - ], |
55 | 53 | 'no_blank_lines_after_class_opening' => true,
|
56 | 54 | 'no_blank_lines_after_phpdoc' => true,
|
57 | 55 | 'no_closing_tag' => true,
|
58 | 56 | 'no_empty_phpdoc' => true,
|
59 | 57 | 'no_empty_statement' => true,
|
| 58 | + 'no_extra_blank_lines' => [ |
| 59 | + 'tokens' => [ |
| 60 | + 'curly_brace_block', |
| 61 | + ], |
| 62 | + ], |
60 | 63 | 'no_leading_import_slash' => true,
|
61 | 64 | 'no_leading_namespace_whitespace' => true,
|
62 | 65 | 'no_mixed_echo_print' => [
|
63 | 66 | 'use' => 'echo',
|
64 | 67 | ],
|
65 |
| - 'no_multiline_whitespace_around_double_arrow' => true, |
66 |
| - 'multiline_whitespace_before_semicolons' => [ |
67 |
| - 'strategy' => 'no_multi_line', |
68 |
| - ], |
| 68 | + 'no_multiple_statements_per_line' => true, |
69 | 69 | 'no_short_bool_cast' => true,
|
70 | 70 | 'no_singleline_whitespace_before_semicolons' => true,
|
71 | 71 | 'no_spaces_after_function_name' => true,
|
72 | 72 | 'no_spaces_around_offset' => true,
|
73 |
| - 'no_spaces_inside_parenthesis' => true, |
74 | 73 | 'no_trailing_comma_in_singleline' => true,
|
75 | 74 | 'no_trailing_whitespace' => true,
|
76 | 75 | 'no_trailing_whitespace_in_comment' => true,
|
77 | 76 | 'no_unneeded_control_parentheses' => true,
|
78 | 77 | 'no_unreachable_default_argument_value' => true,
|
| 78 | + 'no_unused_imports' => true, |
79 | 79 | 'no_useless_return' => true,
|
80 | 80 | 'no_whitespace_before_comma_in_array' => true,
|
81 | 81 | 'no_whitespace_in_blank_line' => true,
|
82 | 82 | 'normalize_index_brace' => true,
|
83 | 83 | 'not_operator_with_successor_space' => true,
|
84 | 84 | 'object_operator_without_whitespace' => true,
|
| 85 | + 'ordered_class_elements' => true, |
| 86 | + 'ordered_imports' => true, |
| 87 | + 'phpdoc_align' => [ |
| 88 | + 'tags' => ['param', 'return', 'throws', 'type'], |
| 89 | + ], |
85 | 90 | 'phpdoc_indent' => true,
|
86 | 91 | 'phpdoc_no_access' => true,
|
| 92 | + 'phpdoc_no_alias_tag' => true, |
87 | 93 | 'phpdoc_no_package' => true,
|
88 | 94 | 'phpdoc_no_useless_inheritdoc' => true,
|
89 | 95 | 'phpdoc_scalar' => true,
|
|
97 | 103 | 'short_scalar_cast' => true,
|
98 | 104 | 'simplified_null_return' => true,
|
99 | 105 | 'single_blank_line_at_eof' => true,
|
100 |
| - 'single_blank_line_before_namespace' => true, |
101 | 106 | 'single_class_element_per_statement' => true,
|
102 | 107 | 'single_import_per_statement' => true,
|
103 | 108 | 'single_line_after_imports' => true,
|
104 | 109 | 'single_line_comment_style' => [
|
105 | 110 | 'comment_types' => ['hash'],
|
106 | 111 | ],
|
107 | 112 | 'single_quote' => true,
|
| 113 | + 'single_space_around_construct' => true, |
108 | 114 | 'space_after_semicolon' => true,
|
| 115 | + 'spaces_inside_parentheses' => ['space' => 'none'], |
109 | 116 | 'standardize_not_equals' => true,
|
| 117 | + 'statement_indentation' => true, |
110 | 118 | 'switch_case_semicolon_to_colon' => true,
|
111 | 119 | 'switch_case_space' => true,
|
112 | 120 | 'ternary_operator_spaces' => true,
|
| 121 | + 'trailing_comma_in_multiline' => true, |
113 | 122 | 'trim_array_spaces' => true,
|
| 123 | + 'type_declaration_spaces' => true, |
114 | 124 | 'unary_operator_spaces' => true,
|
115 |
| - 'trailing_comma_in_multiline' => true, |
116 |
| - 'ordered_class_elements' => true, |
117 |
| - 'ordered_imports' => true, |
118 | 125 | 'visibility_required' => [
|
119 | 126 | 'elements' => ['method', 'property'],
|
120 | 127 | ],
|
121 | 128 | 'whitespace_after_comma_in_array' => true,
|
122 |
| - 'no_unused_imports' => true, |
123 | 129 | ];
|
124 | 130 |
|
| 131 | + |
125 | 132 | $finder = Finder::create()
|
126 | 133 | ->notPath('bootstrap')
|
127 | 134 | ->notPath('storage')
|
|
0 commit comments