1
1
<?php
2
2
3
- $ finder = PhpCsFixer \Finder::create ()
4
- ->files ()
5
- ->name ('*.php ' )
6
- ->in (__DIR__ . '/src ' )
7
- ->in (__DIR__ . '/tests ' )
8
- ;
9
-
10
- return PhpCsFixer \Config::create ()
11
- ->setRules (array (
12
- '@PSR2 ' => true ,
13
- 'array_syntax ' => ['syntax ' => 'short ' ],
14
- 'binary_operator_spaces ' => ['align_double_arrow ' => false , 'align_equals ' => false ],
15
- 'blank_line_after_namespace ' => true ,
16
- 'blank_line_after_opening_tag ' => false ,
17
- 'blank_line_before_return ' => false ,
18
- 'braces ' => ['allow_single_line_closure ' => false ],
19
- 'cast_spaces ' => true ,
20
- 'class_definition ' => ['singleLine ' => false , 'singleItemSingleLine ' => true , 'multiLineExtendsEachSingleLine ' => true ],
21
- 'class_keyword_remove ' => false ,
22
- 'combine_consecutive_unsets ' => true ,
23
- 'concat_space ' => false ,
24
- 'declare_equal_normalize ' => ['space ' => 'single ' ],
25
- 'declare_strict_types ' => false ,
26
- 'elseif ' => true ,
27
- 'encoding ' => true ,
28
- 'full_opening_tag ' => true ,
29
- 'function_declaration ' => true ,
30
- 'function_typehint_space ' => true ,
31
- 'general_phpdoc_annotation_remove ' => ['expectedExceptionMessageRegExp ' , 'expectedException ' , 'expectedExceptionMessage ' ],
32
- 'hash_to_slash_comment ' => true ,
33
- 'header_comment ' => false ,
34
- 'heredoc_to_nowdoc ' => true ,
35
- 'include ' => true ,
36
- 'indentation_type ' => true ,
37
- 'line_ending ' => true ,
38
- 'linebreak_after_opening_tag ' => true ,
39
- 'lowercase_cast ' => true ,
40
- 'lowercase_constants ' => true ,
41
- 'lowercase_keywords ' => true ,
42
- 'mb_str_functions ' => false ,
43
- 'method_argument_space ' => true ,
44
- 'method_separation ' => true ,
45
- 'native_function_casing ' => true ,
46
- 'native_function_invocation ' => false ,
47
- 'new_with_braces ' => true ,
48
- 'no_blank_lines_after_class_opening ' => true ,
49
- 'no_blank_lines_after_phpdoc ' => false ,
50
- 'no_blank_lines_before_namespace ' => false ,
51
- 'no_closing_tag ' => true ,
52
- 'no_empty_comment ' => true ,
53
- 'no_empty_phpdoc ' => true ,
54
- 'no_empty_statement ' => true ,
55
- 'no_extra_consecutive_blank_lines ' => ['break ' , 'continue ' , 'extra ' , 'return ' , 'throw ' , 'use ' , 'parenthesis_brace_block ' , 'square_brace_block ' , 'curly_brace_block ' ],
56
- 'no_leading_import_slash ' => true ,
57
- 'no_leading_namespace_whitespace ' => true ,
58
- 'no_mixed_echo_print ' => ['use ' => 'echo ' ],
59
- 'no_multiline_whitespace_around_double_arrow ' => true ,
60
- 'no_multiline_whitespace_before_semicolons ' => true ,
61
- 'no_short_bool_cast ' => true ,
62
- 'no_short_echo_tag ' => true ,
63
- 'no_singleline_whitespace_before_semicolons ' => true ,
64
- 'no_spaces_after_function_name ' => true ,
65
- 'no_spaces_around_offset ' => true ,
66
- 'no_spaces_inside_parenthesis ' => true ,
67
- 'no_trailing_comma_in_list_call ' => true ,
68
- 'no_trailing_comma_in_singleline_array ' => true ,
69
- 'no_trailing_whitespace ' => true ,
70
- 'no_trailing_whitespace_in_comment ' => true ,
71
- 'no_unneeded_control_parentheses ' => true ,
72
- 'no_unused_imports ' => true ,
73
- 'no_useless_else ' => true ,
74
- 'no_useless_return ' => true ,
75
- 'no_whitespace_before_comma_in_array ' => true ,
76
- 'no_whitespace_in_blank_line ' => true ,
77
- 'normalize_index_brace ' => true ,
78
- 'not_operator_with_space ' => false ,
79
- 'not_operator_with_successor_space ' => false ,
80
- 'object_operator_without_whitespace ' => true ,
81
- 'ordered_class_elements ' => false ,
82
- 'ordered_imports ' => true ,
83
- 'php_unit_fqcn_annotation ' => true ,
84
- 'php_unit_strict ' => false ,
85
- 'phpdoc_add_missing_param_annotation ' => true ,
86
- 'phpdoc_align ' => true ,
87
- 'phpdoc_inline_tag ' => true ,
88
- 'phpdoc_no_access ' => true ,
89
- 'phpdoc_no_alias_tag ' => ['property-read ' => 'property ' , 'property-write ' => 'property ' , 'type ' => 'var ' ],
90
- 'phpdoc_no_empty_return ' => true ,
91
- 'phpdoc_no_package ' => true ,
92
- 'phpdoc_no_useless_inheritdoc ' => true ,
93
- 'phpdoc_order ' => true ,
94
- 'phpdoc_return_self_reference ' => true ,
95
- 'phpdoc_scalar ' => true ,
96
- 'phpdoc_separation ' => false ,
97
- 'phpdoc_single_line_var_spacing ' => true ,
98
- 'phpdoc_summary ' => false ,
99
- 'phpdoc_to_comment ' => true ,
100
- 'phpdoc_trim ' => true ,
101
- 'phpdoc_types ' => true ,
102
- 'phpdoc_var_without_name ' => true ,
103
- 'pow_to_exponentiation ' => false ,
104
- 'pre_increment ' => true ,
105
- 'protected_to_private ' => true ,
106
- 'return_type_declaration ' => true ,
107
- 'semicolon_after_instruction ' => true ,
108
- 'short_scalar_cast ' => true ,
109
- 'single_blank_line_at_eof ' => true ,
110
- 'single_blank_line_before_namespace ' => false ,
111
- 'single_class_element_per_statement ' => true ,
112
- 'single_import_per_statement ' => true ,
113
- 'single_line_after_imports ' => true ,
114
- 'single_quote ' => true ,
115
- 'space_after_semicolon ' => true ,
116
- 'standardize_not_equals ' => true ,
117
- 'strict_param ' => false ,
118
- 'switch_case_semicolon_to_colon ' => true ,
119
- 'switch_case_space ' => true ,
120
- 'ternary_operator_spaces ' => true ,
121
- 'ternary_to_null_coalescing ' => false ,
122
- 'trailing_comma_in_multiline_array ' => true ,
123
- 'trim_array_spaces ' => true ,
124
- 'unary_operator_spaces ' => true ,
125
- 'visibility_required ' => true ,
126
- 'whitespace_after_comma_in_array ' => true ,
127
- ))
128
- ->setFinder ($ finder )
129
- ;
3
+ return My \PhpCsFixerConfig::create ()
4
+ ->setFinder (
5
+ PhpCsFixer \Finder::create ()
6
+ ->files ()
7
+ ->name ('*.php ' )
8
+ ->in (__DIR__ .'/src ' )
9
+ ->in (__DIR__ .'/tests ' )
10
+ );
0 commit comments