forked from Admidio/admidio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs
140 lines (135 loc) · 9.62 KB
/
.php_cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php
// PHP-CS-Fixer v1.12
$level = Symfony\CS\FixerInterface::NONE_LEVEL;
$fixers = array(
//'psr0', // [PSR-0] will not used in future (PSR-0 is deprecated, use PSR-4 instead)
'encoding', // [PSR-1]
'short_tag', // [PSR-1]
//'braces', // [PSR-2] maybe used in future
'class_definition', // [PSR-2]
'elseif', // [PSR-2]
'eof_ending', // [PSR-2]
'function_call_space', // [PSR-2]
'function_decleration', // [PSR-2]
'indentation', // [PSR-2]
//'line_after_namespace', // [PSR-2] <Namespaces> not necessary now
'linefeed', // [PSR-2]
'lowercase_constant', // [PSR-2]
'lowercase_keywords', // [PSR-2]
'method_argument_space', // [PSR-2]
//'multiple_use', // [PSR-2] <Namespaces> not necessary now
'parenthesis', // [PSR-2]
'no_trailing_whitespace_in_comment', // [PSR-2]
'php_closing_tag', // [PSR-2]
//'single_line_after_imports', // [PSR-2] not necessary now
'switch_case_semicolon_to_colon', // [PSR-2]
'switch_case_space', // [PSR-2]
'trailing_spaces', // [PSR-2]
'visibility', // [PSR-2]
'array_element_no_space_before_comma', // [symfony]
'array_element_white_space_after_comma', // [symfony]
'blankline_after_open_tag', // [symfony]
//'concat_without_spaces', // [symfony] {concat_with_spaces} not specified now
'declare_equal_normalize', // [symfony]
'double_arrow_multiline_whitespaces', // [symfony]
'duplicate_semicolon', // [symfony]
'extra_empty_lines', // [symfony]
'function_typehint_space', // [symfony]
'hash_to_slash_comment', // [symfony]
'heredoc_to_nowdoc', // [symfony]
//'include', // [symfony] otherwise specified (maybe used in future)
'join_function', // [symfony]
'lowercase_cast', // [symfony]
//'method_argument_default_value', // [symfony] will be used in future
'list_commas', // [symfony]
//'multiline_array_trailing_comma', // [symfony] maybe used in future
//'namespace_no_leading_whitespace', // [symfony] <Namespaces> not necessary now
'native_function_casing', // [symfony]
'new_with_braces', // [symfony]
'no_blank_lines_after_class_opening', // [symfony]
'no_empty_comment', // [symfony]
'no_empty_lines_after_phpdocs', // [symfony] <PHPDoc>
'no_empty_phpdoc', // [symfony] <PHPDoc>
'no_empty_statement', // [symfony]
'object_operator', // [symfony]
//'operators_spaces', // [symfony] maybe used in future (in combination with unary_operators_spaces)
//'phpdoc_annotation_without_dot', // [symfony] <PHPDoc> maybe used in future
'phpdoc_indent', // [symfony] <PHPDoc>
//'phpdoc_inline_tag', // [symfony] <PHPDoc> not specified now
'phpdoc_no_access', // [symfony] <PHPDoc>
//'phpdoc_no_empty_return', // [symfony] <PHPDoc> maybe used in future
'phpdoc_no_package', // [symfony] <PHPDoc>
//'phpdoc_params', // [symfony] <PHPDoc> maybe used in future
'phpdoc_scalar', // [symfony] <PHPDoc>
//'phpdoc_separation', // [symfony] <PHPDoc> maybe used in future
//'phpdoc_short_description', // [symfony] <PHPDoc> maybe used in future
'phpdoc_single_line_var_spacing', // [symfony] <PHPDoc>
'phpdoc_to_comment', // [symfony] <PHPDoc>
'phpdoc_trim', // [symfony] <PHPDoc>
//'phpdoc_type_to_var', // [symfony] <PHPDoc> {phpdoc_var_to_type} not specified now
'phpdoc_types', // [symfony] <PHPDoc>
//'phpdoc_var_without_name', // [symfony] <PHPDoc> not specified now
//'pre_increment', // [symfony] not necessary now
//'print_to_echo', // [symfony] {echo_to_print}
//'remove_leading_slash_use', // [symfony] <Namespaces> not necessary now
//'remove_lines_between_uses', // [symfony] <Namespaces> not necessary now
//'return', // [symfony] maybe used in future
'self_accessor', // [symfony]
'short_bool_cast', // [symfony]
'short_scalar_cast', // [symfony]
'single_array_no_trailing_comma', // [symfony]
//'single_blank_line_before_namespace', // [symfony] <Namespaces> {no_blank_lines_before_namespace} not necessary now
'single_quote', // [symfony]
'spaces_after_semicolon', // [symfony]
'spaces_before_semicolon', // [symfony]
'spaces_cast', // [symfony]
'standardize_not_equal', // [symfony]
'ternary_spaces', // [symfony]
'trim_array_spaces', // [symfony]
//'unalign_double_arrow', // [symfony] {align_double_arrow} otherwise specified
//'unalign_equals', // [symfony] {align_equals} not specified now
//'unary_operators_spaces', // [symfony] maybe used in future (in combination with operators_spaces)
'unneeded_control_parentheses', // [symfony]
//'unused_use', // [symfony] <Namespaces> not necessary now
'whitespacy_lines', // [symfony]
'align_double_arrow', // [contrib] {unalign_double_arrow}
//'align_equals', // [contrib] {unalign_equals} not specified now
'class_keyword_remove', // [contrib]
'combine_consecutive_unsets', // [contrib]
//'concat_with_spaces', // [contrib] {concat_without_spaces} not specified now
//'echo_to_print', // [contrib] {print_to_echo}
//'empty_return', // [contrib] not specified now
'ereg_to_preg', // [contrib]
//'header_comment', // [contrib] maybe used in future (config needed)
//'logical_not_operators_with_spaces', // [contrib] will not used in future
//'logical_not_operators_with_successor_space', // [contrib] will not used in future
//'long_array_syntax', // [contrib] {short_array_syntax} will be deprecated in future
//'mb_str_functions', // [contrib] not specified now
'multiline_spaces_before_semicolon', // [contrib]
'newline_after_open_tag', // [contrib]
//'no_blank_lines_before_namespace', // [contrib] <Namespaces> {single_blank_line_before_namespace} not necessary now
//'no_useless_else', // [contrib] will be used in future
'no_useless_return', // [contrib]
//'ordered_use', // [contrib] <Namespaces> not necessary now
'php4_constructor', // [contrib]
//'php_unit_construct', // [contrib] <PHPUnit> not necessary now
//'php_unit_dedicate_assert', // [contrib] <PHPUnit> not necessary now
//'php_unit_strict', // [contrib] <PHPUnit> not necessary now
'phpdoc_order', // [contrib] <PHPDoc>
//'phpdoc_var_to_type', // [contrib] <PHPDoc> {phpdoc_type_to_var} not specified now
//'short_array_syntax', // [contrib] {long_array_syntax} will be used in future
//'short_echo_tag', // [contrib] not specified now
//'silenced_deprecation_error', // [contrib]
//'strict', // [contrib] maybe used in future
//'strict_param', // [contrib] should not be used automatically because of problems in code
);
$finder = Symfony\CS\Finder::create()
->in(__DIR__)
->exclude('adm_program/libs')
->exclude('node_modules')
;
return Symfony\CS\Config::create()
->level($level)
->fixers($fixers)
->finder($finder)
;