|
| 1 | +inherit: true |
| 2 | + |
| 3 | +checks: |
| 4 | + php: |
| 5 | + verify_property_names: true |
| 6 | + verify_argument_usable_as_reference: true |
| 7 | + verify_access_scope_valid: true |
| 8 | + variable_existence: true |
| 9 | + useless_calls: true |
| 10 | + use_statement_alias_conflict: true |
| 11 | + fix_doc_comments: false |
| 12 | + avoid_corrupting_byteorder_marks: true |
| 13 | + unused_variables: true |
| 14 | + argument_type_checks: true |
| 15 | + assignment_of_null_return: true |
| 16 | + avoid_aliased_php_functions: true |
| 17 | + avoid_closing_tag: true |
| 18 | + avoid_conflicting_incrementers: true |
| 19 | + avoid_duplicate_types: true |
| 20 | + avoid_entity_manager_injection: true |
| 21 | + avoid_fixme_comments: true |
| 22 | + avoid_length_functions_in_loops: true |
| 23 | + avoid_multiple_statements_on_same_line: true |
| 24 | + avoid_perl_style_comments: true |
| 25 | + avoid_superglobals: true |
| 26 | + avoid_todo_comments: true |
| 27 | + avoid_usage_of_logical_operators: true |
| 28 | + avoid_useless_overridden_methods: true |
| 29 | + blank_line_after_namespace_declaration: true |
| 30 | + catch_class_exists: true |
| 31 | + classes_in_camel_caps: true |
| 32 | + closure_use_modifiable: true |
| 33 | + closure_use_not_conflicting: true |
| 34 | + code_rating: true |
| 35 | + deadlock_detection_in_loops: true |
| 36 | + deprecated_code_usage: true |
| 37 | + duplication: true |
| 38 | + encourage_shallow_comparison: true |
| 39 | + encourage_single_quotes: true |
| 40 | + foreach_traversable: true |
| 41 | + foreach_usable_as_reference: true |
| 42 | + function_in_camel_caps: true |
| 43 | + instanceof_class_exists: true |
| 44 | + line_length: |
| 45 | + max_length: '120' |
| 46 | + method_calls_on_non_object: true |
| 47 | + missing_arguments: true |
| 48 | + more_specific_types_in_doc_comments: true |
| 49 | + newline_at_end_of_file: true |
| 50 | + no_commented_out_code: true |
| 51 | + no_debug_code: true |
| 52 | + no_duplicate_arguments: true |
| 53 | + no_empty_statements: true |
| 54 | + no_error_suppression: true |
| 55 | + no_eval: true |
| 56 | + no_exit: true |
| 57 | + no_global_keyword: true |
| 58 | + no_goto: true |
| 59 | + no_long_variable_names: |
| 60 | + maximum: '20' |
| 61 | + no_non_implemented_abstract_methods: true |
| 62 | + no_property_on_interface: true |
| 63 | + no_short_method_names: |
| 64 | + minimum: '3' |
| 65 | + no_short_open_tag: true |
| 66 | + no_short_variable_names: |
| 67 | + minimum: '3' |
| 68 | + no_trailing_whitespace: true |
| 69 | + no_trait_type_hints: true |
| 70 | + no_underscore_prefix_in_methods: true |
| 71 | + no_underscore_prefix_in_properties: true |
| 72 | + no_unnecessary_final_modifier: true |
| 73 | + no_unnecessary_if: true |
| 74 | + non_commented_empty_catch_block: true |
| 75 | + one_class_per_file: true |
| 76 | + overriding_private_members: true |
| 77 | + parameter_non_unique: true |
| 78 | + parse_doc_comments: true |
| 79 | + optional_parameters_at_the_end: true |
| 80 | + param_doc_comment_if_not_inferrable: true |
| 81 | + parameter_doc_comments: true |
| 82 | + parameters_in_camelcaps: true |
| 83 | + php5_style_constructor: true |
| 84 | + precedence_in_conditions: true |
| 85 | + precedence_mistakes: true |
| 86 | + prefer_while_loop_over_for_loop: true |
| 87 | + properties_in_camelcaps: true |
| 88 | + property_assignments: true |
| 89 | + psr2_class_declaration: true |
| 90 | + psr2_switch_declaration: true |
| 91 | + require_php_tag_first: true |
| 92 | + require_scope_for_methods: true |
| 93 | + require_scope_for_properties: true |
| 94 | + return_doc_comment_if_not_inferrable: true |
| 95 | + return_doc_comments: true |
| 96 | + security_vulnerabilities: true |
| 97 | + side_effects_or_types: true |
| 98 | + simplify_boolean_return: true |
| 99 | + single_namespace_per_use: true |
| 100 | + sql_injection_vulnerabilities: true |
| 101 | + symfony_request_injection: true |
| 102 | + switch_fallthrough_commented: true |
| 103 | + too_many_arguments: true |
| 104 | + unreachable_code: true |
| 105 | + unused_methods: true |
| 106 | + unused_parameters: true |
| 107 | + unused_properties: true |
| 108 | + uppercase_constants: true |
| 109 | + use_self_instead_of_fqcn: true |
| 110 | + |
| 111 | + |
| 112 | +filter: |
| 113 | + excluded_paths: |
| 114 | + - 'vendor/*' |
| 115 | + |
| 116 | +tools: |
| 117 | + |
| 118 | + # PHP Code Similarity Analyzer (https://scrutinizer-ci.com/docs/tools/php/code-similarity-analyzer/) |
| 119 | + php_sim: |
| 120 | + min_mass: 30 # Defaults to 16 |
| 121 | + |
| 122 | + |
| 123 | + # SensioLabs Security Checker (https://scrutinizer-ci.com/docs/tools/php/security-advisory-checker/) |
| 124 | + sensiolabs_security_checker: |
| 125 | + enabled: true |
| 126 | + |
| 127 | + |
| 128 | + # PHP Code Sniffer (https://scrutinizer-ci.com/docs/tools/php/code-sniffer/) |
| 129 | + php_code_sniffer: |
| 130 | + enabled: true |
| 131 | + config: |
| 132 | + standard: PSR2 |
| 133 | + filter: |
| 134 | + excluded_paths: |
| 135 | + - 'vendor/*' |
| 136 | + |
| 137 | + |
| 138 | + # PHP Copy/Paste Detector |
| 139 | + php_cpd: |
| 140 | + enabled: true |
| 141 | + excluded_dirs: |
| 142 | + - 'vendor' |
| 143 | + |
| 144 | + |
| 145 | + # Analyzes the size and structure of a PHP project. |
| 146 | + php_loc: |
| 147 | + enabled: true |
| 148 | + excluded_dirs: |
| 149 | + - vendor |
| 150 | + |
| 151 | + |
| 152 | + # PHP Mess Detector |
| 153 | + php_mess_detector: |
| 154 | + enabled: true |
| 155 | + config: |
| 156 | + rulesets: |
| 157 | + - codesize |
| 158 | + - unusedcode |
| 159 | + - naming |
| 160 | + - design |
| 161 | + - controversial |
| 162 | + filter: |
| 163 | + excluded_paths: |
| 164 | + - 'vendor/*' |
| 165 | + |
| 166 | + |
| 167 | + # PHP PDepend (https://scrutinizer-ci.com/docs/tools/php/pdepend/) |
| 168 | + php_pdepend: |
| 169 | + enabled: true |
| 170 | + excluded_dirs: |
| 171 | + - vendor |
| 172 | + |
| 173 | + |
| 174 | + # PHP Analyzer (https://scrutinizer-ci.com/docs/tools/php/php-analyzer/) |
| 175 | + php_analyzer: |
| 176 | + enabled: true |
| 177 | + config: |
| 178 | + parameter_reference_check: |
| 179 | + enabled: true |
| 180 | + checkstyle: |
| 181 | + enabled: true |
| 182 | + no_trailing_whitespace: true |
| 183 | + naming: |
| 184 | + enabled: true |
| 185 | + local_variable: ^[a-z][a-zA-Z0-9]*$ |
| 186 | + abstract_class_name: ^Abstract|Factory$ |
| 187 | + utility_class_name: Utils?$ |
| 188 | + constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$ |
| 189 | + property_name: ^[a-z][a-zA-Z0-9]*$ |
| 190 | + method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$ |
| 191 | + parameter_name: ^[a-z][a-zA-Z0-9]*$ |
| 192 | + interface_name: ^[A-Z][a-zA-Z0-9]*Interface$ |
| 193 | + type_name: ^[A-Z][a-zA-Z0-9]*$ |
| 194 | + exception_name: ^[A-Z][a-zA-Z0-9]*Exception$ |
| 195 | + isser_method_name: ^(?:is|has|should|may|supports) |
| 196 | + unreachable_code: |
| 197 | + enabled: true |
| 198 | + check_access_control: |
| 199 | + enabled: true |
| 200 | + typo_checks: |
| 201 | + enabled: true |
| 202 | + check_variables: |
| 203 | + enabled: true |
| 204 | + check_calls: |
| 205 | + enabled: true |
| 206 | + method_call_validity: true |
| 207 | + too_many_arguments: true |
| 208 | + missing_argument: true |
| 209 | + argument_type_checks: lenient # Allowed Values: "disabled", "lenient", "strict" |
| 210 | + check_debug_code: |
| 211 | + enabled: true |
| 212 | + check_property_assignments: |
| 213 | + enabled: true |
| 214 | + method_contract_checks: |
| 215 | + enabled: true |
| 216 | + verify_interface_like_constraints: true |
| 217 | + verify_documented_constraints: true |
| 218 | + verify_parent_constraints: true |
| 219 | + check_request_data_usage: |
| 220 | + enabled: true |
| 221 | + suspicious_code: |
| 222 | + enabled: true |
| 223 | + overriding_parameter: false |
| 224 | + overriding_closure_use: true |
| 225 | + parameter_closure_use_conflict: true |
| 226 | + parameter_multiple_times: true |
| 227 | + non_existent_class_in_instanceof_check: true |
| 228 | + non_existent_class_in_catch_clause: true |
| 229 | + assignment_of_null_return: true |
| 230 | + non_commented_switch_fallthrough: true |
| 231 | + non_commented_empty_catch_block: true |
| 232 | + overriding_private_members: true |
| 233 | + use_statement_alias_conflict: true |
| 234 | + precedence_in_condition_assignment: true |
| 235 | + dead_assignments: |
| 236 | + enabled: true |
| 237 | + deadlock_detection: |
| 238 | + enabled: true |
| 239 | + verify_php_doc_comments: |
| 240 | + enabled: true |
| 241 | + parsable: true |
| 242 | + traits_are_not_type_hinted: true |
| 243 | + parameters: true |
| 244 | + return: true |
| 245 | + suggest_more_specific_types: true |
| 246 | + ask_for_return_if_not_inferrable: true |
| 247 | + ask_for_param_type_annotation: ~ |
| 248 | + loops_must_use_braces: |
| 249 | + enabled: true |
| 250 | + check_usage_context: |
| 251 | + enabled: true |
| 252 | + foreach: |
| 253 | + value_as_reference: true |
| 254 | + traversable: true |
| 255 | + missing_argument: ~ |
| 256 | + argument_type_checks: ~ |
| 257 | + simplify_boolean_return: |
| 258 | + enabled: true |
| 259 | + phpunit_checks: |
| 260 | + enabled: false |
| 261 | + reflection_checks: |
| 262 | + enabled: true |
| 263 | + |
| 264 | + # Checks Common Precedence Mistakes |
| 265 | + precedence_checks: |
| 266 | + enabled: true |
| 267 | + assignment_in_condition: true |
| 268 | + comparison_of_bit_result: true |
| 269 | + basic_semantic_checks: |
| 270 | + enabled: true |
| 271 | + property_on_interface: true |
| 272 | + missing_abstract_methods: true |
| 273 | + unused_code: |
| 274 | + enabled: true |
| 275 | + methods: true |
| 276 | + parameters: true |
| 277 | + deprecation_checks: |
| 278 | + enabled: true |
| 279 | + useless_function_calls: |
| 280 | + enabled: true |
| 281 | + metrics_lack_of_cohesion_methods: |
| 282 | + enabled: true |
| 283 | + metrics_coupling: |
| 284 | + enabled: true |
| 285 | + stable_code: |
| 286 | + namespace_prefixes: [] |
| 287 | + classes: [] |
| 288 | + symfony_request_injection: |
| 289 | + enabled: true |
0 commit comments