.scrutinizer.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. filter:
  2. excluded_paths:
  3. - 'vendor/*'
  4. - 'tests/*'
  5. before_commands:
  6. - 'composer --prefer-source --dev install'
  7. - 'cp phpunit.xml.dist phpunit.xml'
  8. tools:
  9. php_mess_detector:
  10. config:
  11. naming_rules: { boolean_method_name: true }
  12. controversial_rules: { camel_case_class_name: true, camel_case_property_name: true, camel_case_method_name: true, camel_case_parameter_name: true, camel_case_variable_name: true }
  13. php_analyzer:
  14. config:
  15. parameter_reference_check: { enabled: false }
  16. checkstyle: { enabled: true, no_trailing_whitespace: true, naming: { enabled: true, local_variable: '^[a-z][a-zA-Z0-9]*$', abstract_class_name: ^Abstract|Factory$, utility_class_name: 'Utils?$', constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$', property_name: '^[a-z][a-zA-Z0-9]*$', method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$', parameter_name: '^[a-z][a-zA-Z0-9]*$', interface_name: '^[A-Z][a-zA-Z0-9]*Interface$', type_name: '^[A-Z][a-zA-Z0-9]*$', exception_name: '^[A-Z][a-zA-Z0-9]*Exception$', isser_method_name: '^(?:is|has|should|may|supports)' } }
  17. unreachable_code: { enabled: true }
  18. check_access_control: { enabled: false }
  19. typo_checks: { enabled: true }
  20. check_variables: { enabled: true }
  21. suspicious_code: { enabled: false, overriding_parameter: false, overriding_closure_use: false, parameter_closure_use_conflict: false, parameter_multiple_times: false, non_existent_class_in_instanceof_check: false, non_existent_class_in_catch_clause: false, assignment_of_null_return: false, non_commented_switch_fallthrough: false, non_commented_empty_catch_block: false, overriding_private_members: false, use_statement_alias_conflict: false, precedence_in_condition_assignment: false }
  22. dead_assignments: { enabled: true }
  23. verify_php_doc_comments: { enabled: true, parameters: true, return: true, suggest_more_specific_types: true, ask_for_return_if_not_inferrable: true, ask_for_param_type_annotation: true }
  24. loops_must_use_braces: { enabled: true }
  25. check_usage_context: { enabled: true, method_call_on_non_object: { enabled: true, ignore_null_pointer: true }, foreach: { value_as_reference: true, traversable: true }, missing_argument: true, argument_type_checks: lenient }
  26. simplify_boolean_return: { enabled: true }
  27. phpunit_checks: { enabled: true }
  28. reflection_checks: { enabled: false }
  29. precedence_checks: { enabled: true, assignment_in_condition: true, comparison_of_bit_result: true }
  30. basic_semantic_checks: { enabled: true }
  31. doc_comment_fixes: { enabled: true }
  32. reflection_fixes: { enabled: false }
  33. use_statement_fixes: { enabled: true, remove_unused: true, preserve_multiple: false, order_alphabetically: false }
  34. php_code_sniffer:
  35. config:
  36. standard: PSR2
  37. sensiolabs_security_checker: true
  38. php_code_coverage:
  39. config_path: phpunit.xml.dist
  40. php_cpd: true
  41. php_loc: true
  42. php_pdepend: true