.scrutinizer.yml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. tools:
  2. external_code_coverage: true
  3. php_sim: true
  4. php_pdepend: true
  5. php_analyzer: true
  6. filter:
  7. excluded_paths:
  8. - 'tests/*'
  9. - 'examples/*'
  10. checks:
  11. php:
  12. verify_property_names: true
  13. verify_argument_usable_as_reference: true
  14. verify_access_scope_valid: true
  15. variable_existence: true
  16. useless_calls: true
  17. use_statement_alias_conflict: true
  18. use_self_instead_of_fqcn: true
  19. uppercase_constants: true
  20. unused_variables: true
  21. unused_properties: true
  22. unused_parameters: true
  23. unused_methods: true
  24. unreachable_code: true
  25. too_many_arguments: true
  26. symfony_request_injection: true
  27. switch_fallthrough_commented: true
  28. sql_injection_vulnerabilities: true
  29. spacing_of_function_arguments: true
  30. spacing_around_non_conditional_operators: true
  31. spacing_around_conditional_operators: true
  32. space_after_cast: true
  33. single_namespace_per_use: true
  34. simplify_boolean_return: true
  35. side_effects_or_types: true
  36. security_vulnerabilities: true
  37. scope_indentation:
  38. spaces_per_level: '4'
  39. return_doc_comments: true
  40. return_doc_comment_if_not_inferrable: true
  41. require_scope_for_properties: true
  42. require_scope_for_methods: true
  43. require_php_tag_first: true
  44. require_braces_around_control_structures: true
  45. remove_trailing_whitespace: true
  46. remove_php_closing_tag: true
  47. remove_extra_empty_lines: true
  48. psr2_switch_declaration: true
  49. psr2_control_structure_declaration: true
  50. psr2_class_declaration: true
  51. property_assignments: true
  52. properties_in_camelcaps: true
  53. prefer_while_loop_over_for_loop: 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. parameters_in_camelcaps: true
  61. parameter_non_unique: true
  62. parameter_doc_comments: true
  63. param_doc_comment_if_not_inferrable: true
  64. overriding_private_members: true
  65. optional_parameters_at_the_end: true
  66. one_class_per_file: true
  67. non_commented_empty_catch_block: true
  68. no_unnecessary_if: true
  69. no_unnecessary_function_call_in_for_loop: true
  70. no_unnecessary_final_modifier: true
  71. no_underscore_prefix_in_properties: true
  72. no_underscore_prefix_in_methods: true
  73. no_trait_type_hints: true
  74. no_trailing_whitespace: true
  75. no_space_inside_cast_operator: true
  76. no_space_between_concatenation_operator: true
  77. no_space_before_semicolon: true
  78. no_space_around_object_operator: true
  79. no_space_after_cast: true
  80. no_short_open_tag: true
  81. no_property_on_interface: true
  82. no_non_implemented_abstract_methods: true
  83. code_rating: true
  84. duplication: true
  85. deprecated_code_usage: true
  86. closure_use_not_conflicting: true
  87. closure_use_modifiable: true
  88. avoid_useless_overridden_methods: true
  89. avoid_conflicting_incrementers: true
  90. assignment_of_null_return: true
  91. no_goto: true
  92. no_global_keyword: true
  93. no_exit: true
  94. no_eval: true
  95. no_error_suppression: true
  96. no_empty_statements: true
  97. no_elseif_statements: true
  98. no_duplicate_arguments: true
  99. no_debug_code: true
  100. no_commented_out_code: true
  101. newline_at_end_of_file: true
  102. naming_conventions:
  103. local_variable: '^[a-z][a-zA-Z0-9]*$'
  104. abstract_class_name: ^Abstract|Factory$
  105. utility_class_name: 'Utils?$'
  106. constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
  107. property_name: '^[a-z][a-zA-Z0-9]*$'
  108. method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
  109. parameter_name: '^[a-z][a-zA-Z0-9]*$'
  110. interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
  111. type_name: '^[A-Z][a-zA-Z0-9]*$'
  112. exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
  113. isser_method_name: '^(?:is|has|should|may|supports|filter)'
  114. more_specific_types_in_doc_comments: true
  115. missing_arguments: true
  116. method_calls_on_non_object: true
  117. lowercase_php_keywords: true
  118. lowercase_basic_constants: true
  119. instanceof_class_exists: true
  120. function_in_camel_caps: true
  121. function_body_start_on_new_line: true
  122. foreach_usable_as_reference: true
  123. foreach_traversable: true
  124. fix_use_statements:
  125. remove_unused: true
  126. preserve_multiple: false
  127. preserve_blanklines: false
  128. order_alphabetically: true
  129. fix_php_opening_tag: true
  130. fix_linefeed: true
  131. fix_line_ending: true
  132. fix_identation_4spaces: true
  133. fix_doc_comments: true
  134. ensure_lower_case_builtin_functions: true
  135. encourage_single_quotes: true
  136. encourage_shallow_comparison: true
  137. encourage_postdec_operator: true
  138. deadlock_detection_in_loops: true
  139. classes_in_camel_caps: true
  140. catch_class_exists: true
  141. blank_line_after_namespace_declaration: true
  142. avoid_usage_of_logical_operators: true
  143. avoid_unnecessary_concatenation: true
  144. avoid_todo_comments: true
  145. avoid_tab_indentation: true
  146. avoid_superglobals: true
  147. avoid_perl_style_comments: true
  148. avoid_fixme_comments: true
  149. avoid_length_functions_in_loops: true
  150. avoid_multiple_statements_on_same_line: true
  151. avoid_entity_manager_injection: true
  152. avoid_duplicate_types: true
  153. avoid_corrupting_byteorder_marks: true
  154. avoid_closing_tag: true
  155. avoid_aliased_php_functions: true
  156. align_assignments: true
  157. argument_type_checks: true
  158. no_mixed_inline_html: true
  159. no_long_variable_names:
  160. maximum: '20'