|
1 | 1 | # language: php
|
| 2 | +build: |
| 3 | + nodes: |
| 4 | + analysis: |
| 5 | + tests: |
| 6 | + override: |
| 7 | + - php-scrutinizer-run |
| 8 | + - |
| 9 | + command: phpcs-run |
| 10 | + use_website_config: true |
2 | 11 |
|
3 | 12 | before_commands:
|
4 |
| - - "composer install --no-dev --prefer-source" |
| 13 | + - "composer install --no-dev --prefer-source" |
5 | 14 | checks:
|
6 |
| - php: |
7 |
| - verify_property_names: true |
8 |
| - verify_argument_usable_as_reference: true |
9 |
| - verify_access_scope_valid: true |
10 |
| - variable_existence: true |
11 |
| - useless_calls: true |
12 |
| - use_statement_alias_conflict: true |
13 |
| - use_self_instead_of_fqcn: true |
14 |
| - uppercase_constants: true |
15 |
| - unused_variables: true |
16 |
| - unused_properties: true |
17 |
| - unused_parameters: true |
18 |
| - unused_methods: true |
19 |
| - unreachable_code: true |
20 |
| - too_many_arguments: true |
21 |
| - symfony_request_injection: true |
22 |
| - switch_fallthrough_commented: true |
23 |
| - spacing_of_function_arguments: true |
24 |
| - spacing_around_non_conditional_operators: true |
25 |
| - spacing_around_conditional_operators: true |
26 |
| - space_after_cast: true |
27 |
| - single_namespace_per_use: true |
28 |
| - simplify_boolean_return: true |
29 |
| - side_effects_or_types: true |
30 |
| - security_vulnerabilities: true |
31 |
| - scope_indentation: |
32 |
| - spaces_per_level: '4' |
33 |
| - return_doc_comments: true |
34 |
| - return_doc_comment_if_not_inferrable: true |
35 |
| - require_scope_for_properties: true |
36 |
| - require_scope_for_methods: true |
37 |
| - require_php_tag_first: true |
38 |
| - require_braces_around_control_structures: true |
39 |
| - remove_trailing_whitespace: true |
40 |
| - remove_php_closing_tag: true |
41 |
| - psr2_switch_declaration: true |
42 |
| - psr2_control_structure_declaration: true |
43 |
| - psr2_class_declaration: true |
44 |
| - property_assignments: true |
45 |
| - prefer_unix_line_ending: true |
46 |
| - prefer_sapi_constant: true |
47 |
| - precedence_mistakes: true |
48 |
| - precedence_in_conditions: true |
49 |
| - phpunit_assertions: true |
50 |
| - php5_style_constructor: true |
51 |
| - parameter_non_unique: true |
52 |
| - parameter_doc_comments: true |
53 |
| - param_doc_comment_if_not_inferrable: true |
54 |
| - overriding_private_members: true |
55 |
| - optional_parameters_at_the_end: true |
56 |
| - one_class_per_file: true |
57 |
| - no_unnecessary_if: true |
58 |
| - no_unnecessary_function_call_in_for_loop: true |
59 |
| - no_unnecessary_final_modifier: true |
60 |
| - no_underscore_prefix_in_properties: true |
61 |
| - no_underscore_prefix_in_methods: true |
62 |
| - no_trait_type_hints: true |
63 |
| - no_trailing_whitespace: true |
64 |
| - no_space_inside_cast_operator: true |
65 |
| - no_space_before_semicolon: true |
66 |
| - no_short_open_tag: true |
67 |
| - no_short_method_names: |
68 |
| - minimum: '3' |
69 |
| - no_property_on_interface: true |
70 |
| - no_non_implemented_abstract_methods: true |
71 |
| - no_mixed_inline_html: true |
72 |
| - no_long_variable_names: |
73 |
| - maximum: '40' |
74 |
| - no_goto: true |
75 |
| - no_global_keyword: true |
76 |
| - no_exit: true |
77 |
| - no_eval: true |
78 |
| - no_empty_statements: true |
79 |
| - no_else_if_statements: true |
80 |
| - no_duplicate_arguments: true |
81 |
| - no_debug_code: true |
82 |
| - newline_at_end_of_file: true |
83 |
| - naming_conventions: |
84 |
| - local_variable: '^[a-z][a-zA-Z0-9_]*$' |
85 |
| - abstract_class_name: ^Abstract|Factory$ |
86 |
| - utility_class_name: 'Utils?$' |
87 |
| - constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$' |
88 |
| - property_name: '^[a-z][a-zA-Z0-9_]*$' |
89 |
| - method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$' |
90 |
| - parameter_name: '^[a-z][a-zA-Z0-9_]*$' |
91 |
| - interface_name: '^[A-Z][a-zA-Z0-9]*Interface$' |
92 |
| - type_name: '^[A-Z][a-zA-Z0-9]*$' |
93 |
| - exception_name: '^[A-Z][a-zA-Z0-9]*Exception$' |
94 |
| - isser_method_name: '^(?:is|has|should|may|supports)' |
95 |
| - more_specific_types_in_doc_comments: true |
96 |
| - missing_arguments: true |
97 |
| - method_calls_on_non_object: true |
98 |
| - lowercase_php_keywords: true |
99 |
| - lowercase_basic_constants: true |
100 |
| - line_length: |
101 |
| - max_length: '120' |
102 |
| - instanceof_class_exists: true |
103 |
| - function_in_camel_caps: true |
104 |
| - function_body_start_on_new_line: true |
105 |
| - foreach_usable_as_reference: true |
106 |
| - foreach_traversable: true |
107 |
| - fix_use_statements: |
108 |
| - remove_unused: true |
109 |
| - preserve_multiple: false |
110 |
| - preserve_blanklines: false |
111 |
| - order_alphabetically: true |
112 |
| - fix_php_opening_tag: true |
113 |
| - fix_linefeed: true |
114 |
| - fix_line_ending: true |
115 |
| - fix_identation_4spaces: true |
116 |
| - fix_doc_comments: true |
117 |
| - ensure_lower_case_builtin_functions: true |
118 |
| - encourage_single_quotes: true |
119 |
| - encourage_shallow_comparison: true |
120 |
| - encourage_postdec_operator: true |
121 |
| - duplication: true |
122 |
| - deprecated_code_usage: true |
123 |
| - deadlock_detection_in_loops: true |
124 |
| - code_rating: true |
125 |
| - closure_use_not_conflicting: true |
126 |
| - closure_use_modifiable: true |
127 |
| - classes_in_camel_caps: true |
128 |
| - catch_class_exists: true |
129 |
| - blank_line_after_namespace_declaration: true |
130 |
| - avoid_useless_overridden_methods: true |
131 |
| - avoid_usage_of_logical_operators: true |
132 |
| - avoid_unnecessary_concatenation: true |
133 |
| - avoid_tab_indentation: true |
134 |
| - avoid_superglobals: true |
135 |
| - avoid_perl_style_comments: true |
136 |
| - avoid_multiple_statements_on_same_line: true |
137 |
| - avoid_length_functions_in_loops: true |
138 |
| - avoid_fixme_comments: true |
139 |
| - avoid_duplicate_types: true |
140 |
| - avoid_corrupting_byteorder_marks: true |
141 |
| - avoid_conflicting_incrementers: true |
142 |
| - avoid_closing_tag: true |
143 |
| - avoid_aliased_php_functions: true |
144 |
| - assignment_of_null_return: true |
145 |
| - argument_type_checks: true |
146 |
| - align_assignments: true |
| 15 | + php: |
| 16 | + verify_property_names: true |
| 17 | + verify_argument_usable_as_reference: true |
| 18 | + verify_access_scope_valid: true |
| 19 | + variable_existence: true |
| 20 | + useless_calls: true |
| 21 | + use_statement_alias_conflict: true |
| 22 | + use_self_instead_of_fqcn: true |
| 23 | + uppercase_constants: true |
| 24 | + unused_variables: true |
| 25 | + unused_properties: true |
| 26 | + unused_parameters: true |
| 27 | + unused_methods: true |
| 28 | + unreachable_code: true |
| 29 | + too_many_arguments: true |
| 30 | + symfony_request_injection: true |
| 31 | + switch_fallthrough_commented: true |
| 32 | + spacing_of_function_arguments: true |
| 33 | + spacing_around_non_conditional_operators: true |
| 34 | + spacing_around_conditional_operators: true |
| 35 | + space_after_cast: true |
| 36 | + single_namespace_per_use: true |
| 37 | + simplify_boolean_return: true |
| 38 | + side_effects_or_types: true |
| 39 | + security_vulnerabilities: true |
| 40 | + scope_indentation: |
| 41 | + spaces_per_level: '4' |
| 42 | + return_doc_comments: true |
| 43 | + return_doc_comment_if_not_inferrable: true |
| 44 | + require_scope_for_properties: true |
| 45 | + require_scope_for_methods: true |
| 46 | + require_php_tag_first: true |
| 47 | + require_braces_around_control_structures: true |
| 48 | + remove_trailing_whitespace: true |
| 49 | + remove_php_closing_tag: true |
| 50 | + psr2_switch_declaration: true |
| 51 | + psr2_control_structure_declaration: true |
| 52 | + psr2_class_declaration: true |
| 53 | + property_assignments: true |
| 54 | + prefer_unix_line_ending: true |
| 55 | + prefer_sapi_constant: true |
| 56 | + precedence_mistakes: true |
| 57 | + precedence_in_conditions: true |
| 58 | + phpunit_assertions: true |
| 59 | + php5_style_constructor: true |
| 60 | + parameter_non_unique: true |
| 61 | + parameter_doc_comments: true |
| 62 | + param_doc_comment_if_not_inferrable: true |
| 63 | + overriding_private_members: true |
| 64 | + optional_parameters_at_the_end: true |
| 65 | + one_class_per_file: true |
| 66 | + no_unnecessary_if: true |
| 67 | + no_unnecessary_function_call_in_for_loop: true |
| 68 | + no_unnecessary_final_modifier: true |
| 69 | + no_underscore_prefix_in_properties: true |
| 70 | + no_underscore_prefix_in_methods: true |
| 71 | + no_trait_type_hints: true |
| 72 | + no_trailing_whitespace: true |
| 73 | + no_space_inside_cast_operator: true |
| 74 | + no_space_before_semicolon: true |
| 75 | + no_short_open_tag: true |
| 76 | + no_short_method_names: |
| 77 | + minimum: '3' |
| 78 | + no_property_on_interface: true |
| 79 | + no_non_implemented_abstract_methods: true |
| 80 | + no_mixed_inline_html: true |
| 81 | + no_long_variable_names: |
| 82 | + maximum: '40' |
| 83 | + no_goto: true |
| 84 | + no_global_keyword: true |
| 85 | + no_exit: true |
| 86 | + no_eval: true |
| 87 | + no_empty_statements: true |
| 88 | + no_else_if_statements: true |
| 89 | + no_duplicate_arguments: true |
| 90 | + no_debug_code: true |
| 91 | + newline_at_end_of_file: true |
| 92 | + naming_conventions: |
| 93 | + local_variable: '^[a-z][a-zA-Z0-9_]*$' |
| 94 | + abstract_class_name: '^Abstract[a-zA-Z]*$' |
| 95 | + constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$' |
| 96 | + property_name: '^[a-z][a-zA-Z0-9_]*$' |
| 97 | + method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$' |
| 98 | + parameter_name: '^[a-z][a-zA-Z0-9_]*$' |
| 99 | + interface_name: '^[A-Z][a-zA-Z0-9]*Interface$' |
| 100 | + type_name: '^[A-Z][a-zA-Z0-9]*$' |
| 101 | + exception_name: '^[A-Z][a-zA-Z0-9]*Exception$' |
| 102 | + isser_method_name: '^(?:is|has|should|may|supports)' |
| 103 | + more_specific_types_in_doc_comments: true |
| 104 | + missing_arguments: true |
| 105 | + method_calls_on_non_object: true |
| 106 | + lowercase_php_keywords: true |
| 107 | + lowercase_basic_constants: true |
| 108 | + line_length: |
| 109 | + max_length: '120' |
| 110 | + instanceof_class_exists: true |
| 111 | + function_in_camel_caps: true |
| 112 | + function_body_start_on_new_line: true |
| 113 | + foreach_usable_as_reference: true |
| 114 | + foreach_traversable: true |
| 115 | + fix_use_statements: |
| 116 | + remove_unused: true |
| 117 | + preserve_multiple: false |
| 118 | + preserve_blanklines: false |
| 119 | + order_alphabetically: true |
| 120 | + fix_php_opening_tag: true |
| 121 | + fix_linefeed: true |
| 122 | + fix_line_ending: true |
| 123 | + fix_identation_4spaces: true |
| 124 | + fix_doc_comments: true |
| 125 | + ensure_lower_case_builtin_functions: true |
| 126 | + encourage_single_quotes: true |
| 127 | + encourage_shallow_comparison: true |
| 128 | + encourage_postdec_operator: true |
| 129 | + duplication: true |
| 130 | + deprecated_code_usage: true |
| 131 | + deadlock_detection_in_loops: true |
| 132 | + code_rating: true |
| 133 | + closure_use_not_conflicting: true |
| 134 | + closure_use_modifiable: true |
| 135 | + classes_in_camel_caps: true |
| 136 | + catch_class_exists: true |
| 137 | + blank_line_after_namespace_declaration: true |
| 138 | + avoid_useless_overridden_methods: true |
| 139 | + avoid_usage_of_logical_operators: true |
| 140 | + avoid_unnecessary_concatenation: true |
| 141 | + avoid_tab_indentation: true |
| 142 | + avoid_superglobals: true |
| 143 | + avoid_perl_style_comments: true |
| 144 | + avoid_multiple_statements_on_same_line: true |
| 145 | + avoid_length_functions_in_loops: true |
| 146 | + avoid_fixme_comments: true |
| 147 | + avoid_duplicate_types: true |
| 148 | + avoid_corrupting_byteorder_marks: true |
| 149 | + avoid_conflicting_incrementers: true |
| 150 | + avoid_closing_tag: true |
| 151 | + avoid_aliased_php_functions: true |
| 152 | + assignment_of_null_return: true |
| 153 | + argument_type_checks: true |
| 154 | + align_assignments: true |
| 155 | + remove_extra_empty_lines: true |
| 156 | + properties_in_camelcaps: true |
| 157 | + parameters_in_camelcaps: true |
| 158 | + overriding_parameter: true |
| 159 | + no_short_variable_names: |
| 160 | + minimum: '3' |
| 161 | + check_method_contracts: |
| 162 | + verify_interface_like_constraints: true |
| 163 | + verify_documented_constraints: true |
| 164 | + verify_parent_constraints: true |
147 | 165 | tools:
|
148 |
| - external_code_coverage: |
149 |
| - timeout: 600 |
150 |
| - php_sim: false |
151 |
| - php_code_coverage: |
152 |
| - enabled: true |
153 |
| - php_code_sniffer: |
154 |
| - enabled: true |
155 |
| - config: |
156 |
| - standard: PSR2 |
157 |
| - filter: |
158 |
| - paths: ["src/*", "tests/*"] |
159 |
| - php_cs_fixer: |
160 |
| - enabled: true |
161 |
| - config: |
162 |
| - level: all |
163 |
| - filter: |
164 |
| - paths: ["src/*", "tests/*"] |
165 |
| - php_cpd: |
166 |
| - enabled: true |
167 |
| - excluded_dirs: ["docs", "tests", "vendor"] |
168 |
| - php_loc: |
169 |
| - enabled: true |
170 |
| - excluded_dirs: ["docs", "tests", "vendor"] |
171 |
| - php_mess_detector: |
172 |
| - config: |
173 |
| - code_size_rules: |
174 |
| - cyclomatic_complexity: true |
175 |
| - unused_code_rules: |
176 |
| - unused_local_variable: true |
177 |
| - unused_private_method: true |
178 |
| - unused_formal_parameter: true |
179 |
| - php_pdepend: |
180 |
| - enabled: true |
181 |
| - excluded_dirs: ["docs", "tests", "vendor"] |
182 |
| - php_analyzer: |
183 |
| - enabled: true |
184 |
| - filter: |
185 |
| - paths: ["src/*", "tests/*"] |
186 |
| - sensiolabs_security_checker: true |
187 |
| - php_hhvm: |
188 |
| - enabled: false |
189 |
| -filter: |
190 |
| - excluded_paths: |
191 |
| - - 'docs/*' |
| 166 | + external_code_coverage: |
| 167 | + timeout: 600 |
| 168 | + php_sim: false |
| 169 | + php_code_coverage: |
| 170 | + enabled: true |
| 171 | + php_cpd: |
| 172 | + enabled: true |
| 173 | + excluded_dirs: |
| 174 | + - docs |
| 175 | + - tests |
| 176 | + - vendor |
| 177 | + php_loc: |
| 178 | + enabled: true |
| 179 | + excluded_dirs: |
| 180 | + - docs |
| 181 | + - tests |
| 182 | + - vendor |
| 183 | + php_mess_detector: |
| 184 | + config: |
| 185 | + code_size_rules: |
| 186 | + cyclomatic_complexity: true |
| 187 | + unused_code_rules: |
| 188 | + unused_local_variable: true |
| 189 | + unused_private_method: true |
| 190 | + unused_formal_parameter: true |
| 191 | + php_pdepend: |
| 192 | + enabled: true |
| 193 | + excluded_dirs: |
| 194 | + - docs |
| 195 | + - tests |
| 196 | + - vendor |
| 197 | + php_analyzer: |
| 198 | + enabled: true |
| 199 | + filter: |
| 200 | + paths: |
| 201 | + - 'src/*' |
192 | 202 | - 'tests/*'
|
| 203 | + sensiolabs_security_checker: true |
| 204 | + php_hhvm: |
| 205 | + enabled: false |
| 206 | +filter: |
| 207 | + excluded_paths: |
| 208 | + - 'docs/*' |
| 209 | + - 'tests/*' |
0 commit comments