1
1
<?php
2
2
3
- require_once __DIR__ .'/vendor/sllh/php-cs-fixer-styleci-bridge/autoload.php ' ;
4
-
5
3
$ header = <<<EOF
6
4
This file is part of the RollerworksDatagrid package.
7
5
@@ -11,16 +9,155 @@ This source file is subject to the MIT license that is bundled
11
9
with this source code in the file LICENSE.
12
10
EOF ;
13
11
14
- $ config = SLLH \StyleCIBridge \ConfigBridge::create ()
15
- ->setUsingCache (true )
12
+ return PhpCsFixer \Config::create ()
16
13
->setRiskyAllowed (true )
17
- ;
18
-
19
- $ config ->setRules (
20
- array_merge (
21
- $ config ->getRules (),
22
- ['header_comment ' => ['header ' => $ header ]]
14
+ ->setRules (
15
+ // This rules list is based of the styleci.yml file.
16
+ // Last updated on 2016-12-24 16:30
17
+ [
18
+ 'header_comment ' => ['header ' => $ header ],
19
+ 'array_syntax ' =>
20
+ [
21
+ 'syntax ' => 'short ' ,
22
+ ],
23
+ 'binary_operator_spaces ' =>
24
+ [
25
+ 'align_equals ' => false ,
26
+ 'align_double_arrow ' => false ,
27
+ ],
28
+ 'blank_line_after_namespace ' => true ,
29
+ 'blank_line_after_opening_tag ' => true ,
30
+ 'blank_line_before_return ' => true ,
31
+ 'braces ' => true ,
32
+ 'cast_spaces ' => true ,
33
+ 'class_definition ' =>
34
+ [
35
+ 'singleLine ' => true ,
36
+ ],
37
+ 'concat_space ' =>
38
+ [
39
+ 'spacing ' => 'none ' ,
40
+ ],
41
+ 'declare_equal_normalize ' => true ,
42
+ 'declare_strict_types ' => true ,
43
+ 'elseif ' => true ,
44
+ 'encoding ' => true ,
45
+ 'full_opening_tag ' => true ,
46
+ 'function_declaration ' => true ,
47
+ 'function_typehint_space ' => true ,
48
+ 'general_phpdoc_annotation_remove ' =>
49
+ [
50
+ 'access ' ,
51
+ 'package ' ,
52
+ 'subpackage ' ,
53
+ ],
54
+ 'hash_to_slash_comment ' => true ,
55
+ 'heredoc_to_nowdoc ' => true ,
56
+ 'include ' => true ,
57
+ 'indentation_type ' => true ,
58
+ 'line_ending ' => true ,
59
+ 'linebreak_after_opening_tag ' => true ,
60
+ 'lowercase_cast ' => true ,
61
+ 'lowercase_constants ' => true ,
62
+ 'lowercase_keywords ' => true ,
63
+ 'method_argument_space ' => true ,
64
+ 'method_separation ' => true ,
65
+ 'native_function_casing ' => true ,
66
+ 'new_with_braces ' => true ,
67
+ 'no_alias_functions ' => true ,
68
+ 'no_blank_lines_after_class_opening ' => true ,
69
+ 'no_blank_lines_after_phpdoc ' => true ,
70
+ 'no_closing_tag ' => true ,
71
+ 'no_empty_phpdoc ' => true ,
72
+ 'no_empty_statement ' => true ,
73
+ 'no_extra_consecutive_blank_lines ' =>
74
+ [
75
+ 'throw ' ,
76
+ 'use ' ,
77
+ 'curly_brace_block ' ,
78
+ 'parenthesis_brace_block ' ,
79
+ 'square_brace_block ' ,
80
+ 'extra ' ,
81
+ ],
82
+ 'no_leading_import_slash ' => true ,
83
+ 'no_leading_namespace_whitespace ' => true ,
84
+ 'no_mixed_echo_print ' =>
85
+ [
86
+ 'use ' => 'echo ' ,
87
+ ],
88
+ 'no_multiline_whitespace_around_double_arrow ' => true ,
89
+ 'no_short_bool_cast ' => true ,
90
+ 'no_singleline_whitespace_before_semicolons ' => true ,
91
+ 'no_spaces_after_function_name ' => true ,
92
+ 'no_spaces_around_offset ' =>
93
+ [
94
+ 'inside ' ,
95
+ 'outside ' ,
96
+ ],
97
+ 'no_spaces_inside_parenthesis ' => true ,
98
+ 'no_trailing_comma_in_list_call ' => true ,
99
+ 'no_trailing_comma_in_singleline_array ' => true ,
100
+ 'no_trailing_whitespace ' => true ,
101
+ 'no_trailing_whitespace_in_comment ' => true ,
102
+ 'no_unneeded_control_parentheses ' => true ,
103
+ 'no_unreachable_default_argument_value ' => true ,
104
+ 'no_unused_imports ' => true ,
105
+ 'no_whitespace_before_comma_in_array ' => true ,
106
+ 'no_whitespace_in_blank_line ' => true ,
107
+ 'normalize_index_brace ' => true ,
108
+ 'object_operator_without_whitespace ' => true ,
109
+ 'ordered_imports ' => true ,
110
+ 'php_unit_fqcn_annotation ' => true ,
111
+ 'phpdoc_align ' => true ,
112
+ 'phpdoc_annotation_without_dot ' => true ,
113
+ 'phpdoc_indent ' => true ,
114
+ 'phpdoc_inline_tag ' => true ,
115
+ 'phpdoc_no_alias_tag ' =>
116
+ [
117
+ 'link ' => 'see ' ,
118
+ 'type ' => 'var ' ,
119
+ ],
120
+ 'phpdoc_order ' => true ,
121
+ 'phpdoc_scalar ' => true ,
122
+ 'phpdoc_separation ' => true ,
123
+ 'phpdoc_single_line_var_spacing ' => true ,
124
+ 'phpdoc_summary ' => true ,
125
+ 'phpdoc_to_comment ' => true ,
126
+ 'phpdoc_trim ' => true ,
127
+ 'phpdoc_types ' => true ,
128
+ 'phpdoc_var_without_name ' => true ,
129
+ 'pre_increment ' => true ,
130
+ 'psr4 ' => true ,
131
+ 'return_type_declaration ' => true ,
132
+ 'self_accessor ' => true ,
133
+ 'short_scalar_cast ' => true ,
134
+ 'silenced_deprecation_error ' => true ,
135
+ 'single_blank_line_at_eof ' => true ,
136
+ 'single_blank_line_before_namespace ' => true ,
137
+ 'single_class_element_per_statement ' => true ,
138
+ 'single_import_per_statement ' => true ,
139
+ 'single_line_after_imports ' => true ,
140
+ 'single_quote ' => true ,
141
+ 'space_after_semicolon ' => true ,
142
+ 'standardize_not_equals ' => true ,
143
+ 'strict_param ' => true ,
144
+ 'switch_case_semicolon_to_colon ' => true ,
145
+ 'switch_case_space ' => true ,
146
+ 'ternary_operator_spaces ' => true ,
147
+ 'trailing_comma_in_multiline_array ' => true ,
148
+ 'trim_array_spaces ' => true ,
149
+ 'unary_operator_spaces ' => true ,
150
+ 'visibility_required ' =>
151
+ [
152
+ 'method ' ,
153
+ 'property ' ,
154
+ ],
155
+ 'whitespace_after_comma_in_array ' => true ,
156
+ ]
23
157
)
24
- );
25
-
26
- return $ config ;
158
+ ->setFinder (
159
+ PhpCsFixer \Finder::create ()
160
+ ->exclude ('Fixtures ' )
161
+ ->in (__DIR__ )
162
+ )
163
+ ;
0 commit comments