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