11<?php
22
3- use Symfony \CS \Config \Config ;
4- use Symfony \CS \FixerInterface ;
5- use Symfony \CS \Finder \DefaultFinder ;
3+ return PhpCsFixer \Config::create ()
4+ ->setRules ([
5+ '@PSR2 ' => true ,
6+ 'array_syntax ' => ['syntax ' => 'short ' ],
7+ 'combine_consecutive_unsets ' => true ,
8+ 'method_separation ' => true ,
9+ 'no_multiline_whitespace_before_semicolons ' => true ,
10+ 'single_quote ' => true ,
611
7- $ fixers = [
8- 'blankline_after_open_tag ' ,
9- 'braces ' ,
10- 'concat_without_spaces ' ,
11- 'double_arrow_multiline_whitespaces ' ,
12- 'duplicate_semicolon ' ,
13- 'elseif ' ,
14- 'empty_return ' ,
15- 'encoding ' ,
16- 'eof_ending ' ,
17- 'extra_empty_lines ' ,
18- 'function_call_space ' ,
19- 'function_declaration ' ,
20- 'include ' ,
21- 'indentation ' ,
22- 'join_function ' ,
23- 'line_after_namespace ' ,
24- 'linefeed ' ,
25- 'list_commas ' ,
26- 'logical_not_operators_with_successor_space ' ,
27- 'lowercase_constants ' ,
28- 'lowercase_keywords ' ,
29- 'method_argument_space ' ,
30- 'multiline_array_trailing_comma ' ,
31- 'multiline_spaces_before_semicolon ' ,
32- 'multiple_use ' ,
33- 'namespace_no_leading_whitespace ' ,
34- 'no_blank_lines_after_class_opening ' ,
35- 'no_empty_lines_after_phpdocs ' ,
36- 'object_operator ' ,
37- 'operators_spaces ' ,
38- 'parenthesis ' ,
39- 'phpdoc_indent ' ,
40- 'phpdoc_inline_tag ' ,
41- 'phpdoc_no_access ' ,
42- 'phpdoc_no_package ' ,
43- 'phpdoc_scalar ' ,
44- 'phpdoc_short_description ' ,
45- 'phpdoc_to_comment ' ,
46- 'phpdoc_trim ' ,
47- 'phpdoc_type_to_var ' ,
48- 'phpdoc_var_without_name ' ,
49- 'remove_leading_slash_use ' ,
50- 'remove_lines_between_uses ' ,
51- 'return ' ,
52- 'self_accessor ' ,
53- 'short_array_syntax ' ,
54- 'short_echo_tag ' ,
55- 'short_tag ' ,
56- 'single_array_no_trailing_comma ' ,
57- 'single_blank_line_before_namespace ' ,
58- 'single_line_after_imports ' ,
59- 'single_quote ' ,
60- 'spaces_before_semicolon ' ,
61- 'spaces_cast ' ,
62- 'standardize_not_equal ' ,
63- 'ternary_spaces ' ,
64- 'trailing_spaces ' ,
65- 'trim_array_spaces ' ,
66- 'unalign_equals ' ,
67- 'unary_operators_spaces ' ,
68- 'unused_use ' ,
69- 'visibility ' ,
70- 'whitespacy_lines ' ,
71- ];
72-
73- return Config::create ()
74- ->fixers ($ fixers )
75- ->level (FixerInterface::NONE_LEVEL )
76- ->setUsingCache (false );
12+ 'binary_operator_spaces ' => [
13+ 'align_double_arrow ' => false ,
14+ 'align_equals ' => false ,
15+ ],
16+ 'blank_line_after_opening_tag ' => true ,
17+ 'blank_line_before_return ' => true , // DEPRECATED: use blank_line_before_statement instead.
18+ 'blank_line_before_statement ' => [
19+ 'statements ' => [
20+ 'break ' ,
21+ 'continue ' ,
22+ 'declare ' ,
23+ 'return ' ,
24+ 'throw ' ,
25+ 'try ' ,
26+ ],
27+ ],
28+ 'braces ' => [
29+ 'allow_single_line_closure ' => true ,
30+ ],
31+ // 'cast_spaces' => true,
32+ // 'class_definition' => ['singleLine' => true],
33+ 'concat_space ' => ['spacing ' => 'none ' ],
34+ 'declare_equal_normalize ' => true ,
35+ 'function_typehint_space ' => true ,
36+ 'hash_to_slash_comment ' => true ,
37+ 'include ' => true ,
38+ 'lowercase_cast ' => true ,
39+ // 'native_function_casing' => true,
40+ // 'new_with_braces' => true,
41+ // 'no_blank_lines_after_class_opening' => true,
42+ // 'no_blank_lines_after_phpdoc' => true,
43+ // 'no_empty_comment' => true,
44+ // 'no_empty_phpdoc' => true,
45+ // 'no_empty_statement' => true,
46+ 'no_extra_consecutive_blank_lines ' => [
47+ 'curly_brace_block ' ,
48+ 'extra ' ,
49+ 'parenthesis_brace_block ' ,
50+ 'square_brace_block ' ,
51+ 'throw ' ,
52+ 'use ' ,
53+ ],
54+ // 'not_operator_with_space' => true,
55+ 'not_operator_with_successor_space ' => true ,
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_short_bool_cast' => true,
61+ // 'no_singleline_whitespace_before_semicolons' => true,
62+ 'no_spaces_around_offset ' => true ,
63+ // 'no_trailing_comma_in_list_call' => true,
64+ // 'no_trailing_comma_in_singleline_array' => true,
65+ // 'no_unneeded_control_parentheses' => true,
66+ 'no_unused_imports ' => true ,
67+ 'no_whitespace_before_comma_in_array ' => true ,
68+ 'no_whitespace_in_blank_line ' => true ,
69+ // 'normalize_index_brace' => true,
70+ 'object_operator_without_whitespace ' => true ,
71+ // 'php_unit_fqcn_annotation' => true,
72+ // 'phpdoc_align' => true,
73+ // 'phpdoc_annotation_without_dot' => true,
74+ // 'phpdoc_indent' => true,
75+ // 'phpdoc_inline_tag' => true,
76+ // 'phpdoc_no_access' => true,
77+ // 'phpdoc_no_alias_tag' => true,
78+ // 'phpdoc_no_empty_return' => true,
79+ // 'phpdoc_no_package' => true,
80+ // 'phpdoc_no_useless_inheritdoc' => true,
81+ // 'phpdoc_return_self_reference' => true,
82+ // 'phpdoc_scalar' => true,
83+ // 'phpdoc_separation' => true,
84+ // 'phpdoc_single_line_var_spacing' => true,
85+ // 'phpdoc_summary' => true,
86+ // 'phpdoc_to_comment' => true,
87+ // 'phpdoc_trim' => true,
88+ // 'phpdoc_types' => true,
89+ // 'phpdoc_var_without_name' => true,
90+ // 'pre_increment' => true,
91+ // 'return_type_declaration' => true,
92+ // 'self_accessor' => true,
93+ // 'short_scalar_cast' => true,
94+ 'single_blank_line_before_namespace ' => true ,
95+ // 'single_class_element_per_statement' => true,
96+ // 'space_after_semicolon' => true,
97+ // 'standardize_not_equals' => true,
98+ 'ternary_operator_spaces ' => true ,
99+ 'trailing_comma_in_multiline_array ' => true ,
100+ 'trim_array_spaces ' => true ,
101+ 'unary_operator_spaces ' => true ,
102+ 'whitespace_after_comma_in_array ' => true ,
103+ 'ternary_to_null_coalescing ' => true ,
104+ 'compact_nullable_typehint ' => true ,
105+ 'linebreak_after_opening_tag ' => true ,
106+ 'lowercase_cast ' => true ,
107+ ])
108+ //->setIndent("\t")
109+ ->setLineEnding ("\n" );
0 commit comments