3
3
declare(strict_types=1);
4
4
5
5
/**
6
- * Rules taken from [Laravel Shift](https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200)
7
- * with some adjustments.
6
+ * List of available rules: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/3.0/doc/rules/index.rst
8
7
*/
9
8
$rules = [
10
9
'array_syntax' => ['syntax' => 'short'],
@@ -37,13 +36,13 @@ $rules = [
37
36
'concat_space' => ['spacing' => 'none'],
38
37
'constant_case' => ['case' => 'lower'],
39
38
'declare_equal_normalize' => true,
40
- 'declare_strict_types' => true, // added by Lemaur
39
+ 'declare_strict_types' => true,
41
40
'echo_tag_syntax' => ['format' => 'long'],
42
41
'elseif' => true,
43
42
'encoding' => true,
44
- 'final_internal_class' => true, // added by Lemaur
43
+ 'final_internal_class' => true,
45
44
'full_opening_tag' => true,
46
- 'fully_qualified_strict_types' => true, // added by Shift
45
+ 'fully_qualified_strict_types' => true,
47
46
'function_declaration' => true,
48
47
'function_typehint_space' => true,
49
48
'heredoc_to_nowdoc' => true,
@@ -54,13 +53,13 @@ $rules = [
54
53
'line_ending' => true,
55
54
'lowercase_cast' => true,
56
55
'lowercase_keywords' => true,
57
- 'lowercase_static_reference' => true, // added from Symfony
58
- 'magic_method_casing' => true, // added from Symfony
56
+ 'lowercase_static_reference' => true,
57
+ 'magic_method_casing' => true,
59
58
'magic_constant_casing' => true,
60
59
'method_argument_space' => true,
61
60
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
62
61
'native_function_casing' => true,
63
- 'new_with_braces' => true, // added by Lemaur
62
+ 'new_with_braces' => true,
64
63
'no_alias_functions' => true,
65
64
'no_blank_lines_after_class_opening' => true,
66
65
'no_blank_lines_after_phpdoc' => true,
@@ -102,25 +101,25 @@ $rules = [
102
101
],
103
102
],
104
103
'no_unreachable_default_argument_value' => true,
105
- 'no_unused_imports' => true, // added by Lemaur
106
- 'no_useless_else' => true, // added by Lemaur
104
+ 'no_unused_imports' => true,
105
+ 'no_useless_else' => true,
107
106
'no_useless_return' => true,
108
107
'no_whitespace_before_comma_in_array' => true,
109
108
'no_whitespace_in_blank_line' => true,
110
109
'normalize_index_brace' => true,
111
110
'not_operator_with_successor_space' => true,
112
111
'object_operator_without_whitespace' => true,
113
112
'ordered_imports' => ['sort_algorithm' => 'alpha'],
114
- 'php_unit_strict' => true, // added by Lemaur
115
- 'php_unit_test_class_requires_covers' => true, // added by Lemaur
116
- 'phpdoc_add_missing_param_annotation' => true, // added by Lemaur
117
- 'phpdoc_align' => false, // added by Lemaur
113
+ 'php_unit_strict' => true,
114
+ 'php_unit_test_class_requires_covers' => true,
115
+ 'phpdoc_add_missing_param_annotation' => true,
116
+ 'phpdoc_align' => false,
118
117
'phpdoc_indent' => true,
119
- 'phpdoc_inline_tag_normalizer',
118
+ 'phpdoc_inline_tag_normalizer' => true ,
120
119
'phpdoc_no_access' => true,
121
120
'phpdoc_no_package' => true,
122
121
'phpdoc_no_useless_inheritdoc' => true,
123
- 'phpdoc_order' => true, // added by Lemaur
122
+ 'phpdoc_order' => true,
124
123
'phpdoc_scalar' => true,
125
124
'phpdoc_single_line_var_spacing' => true,
126
125
'phpdoc_summary' => true,
@@ -132,7 +131,7 @@ $rules = [
132
131
'self_accessor' => true,
133
132
'semicolon_after_instruction' => true,
134
133
'short_scalar_cast' => true,
135
- 'simplified_null_return' => true, // added by Lemaur
134
+ 'simplified_null_return' => true,
136
135
'single_blank_line_at_eof' => true,
137
136
'single_blank_line_before_namespace' => true,
138
137
'single_class_element_per_statement' => [
@@ -150,13 +149,13 @@ $rules = [
150
149
'single_trait_insert_per_statement' => true,
151
150
'space_after_semicolon' => true,
152
151
'standardize_not_equals' => true,
153
- 'strict_comparison' => true, // added by Lemaur
154
- 'strict_param' => true, // added by Lemaur
152
+ 'strict_comparison' => true,
153
+ 'strict_param' => true,
155
154
'switch_case_semicolon_to_colon' => true,
156
155
'switch_case_space' => true,
157
156
'ternary_operator_spaces' => true,
158
157
'trailing_comma_in_multiline' => [
159
- 'elements' => 'arrays',
158
+ 'elements' => [ 'arrays'] ,
160
159
],
161
160
'trim_array_spaces' => true,
162
161
'unary_operator_spaces' => true,
@@ -166,7 +165,7 @@ $rules = [
166
165
'method',
167
166
'const',
168
167
],
169
- ], // added by Lemaur
168
+ ],
170
169
'whitespace_after_comma_in_array' => true,
171
170
];
172
171
0 commit comments