Checkout Config
before_commands:
- "composer install --prefer-dist"
checks:
php:
code_rating: true
duplication: false
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
tools:
php_sim: false
php_changetracking: true
sensiolabs_security_checker: true
php_mess_detector: true
php_code_sniffer: true
php_analyzer: true
php_code_coverage: false
php_cpd: true
php_pdepend:
excluded_dirs: ["vendor/*", "src/ServerBundle/Server/Tests/*", "src/Component/Server/Tests/*", "src/Component/ClientCredentials/Tests/*"]
filter:
excluded_paths: ["vendor/*", "src/ServerBundle/Server/Tests/*", "src/Component/Server/Tests/*", "src/Component/ClientCredentials/Tests/*"]
build_failure_conditions:
- 'elements.rating(<= C).exists' # No classes/methods with a rating of C or worse
- 'elements.rating(<= C).new.exists' # No new classes/methods with a rating of C or worse
- 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
- 'project.metric("scrutinizer.quality", < 9)' # Code Quality Rating drops below 9
Repository Config
checks:
php:
fix_php_opening_tag: false
remove_php_closing_tag: false
one_class_per_file: true
side_effects_or_types: true
no_mixed_inline_html: false
require_braces_around_control_structures: false
php5_style_constructor: true
no_global_keyword: true
avoid_usage_of_logical_operators: true
psr2_class_declaration: true
no_underscore_prefix_in_properties: false
no_underscore_prefix_in_methods: false
blank_line_after_namespace_declaration: true
single_namespace_per_use: false
psr2_switch_declaration: true
psr2_control_structure_declaration: false
avoid_superglobals: true
security_vulnerabilities: false
no_exit: true
use_self_instead_of_fqcn: true
uppercase_constants: true
return_doc_comments: true
avoid_fixme_comments: true
avoid_todo_comments: true
check_method_contracts:
verify_interface_like_constraints: true
verify_documented_constraints: true
verify_parent_constraints: true
align_assignments: true
avoid_unnecessary_concatenation: true
classes_in_camel_caps: true
encourage_postdec_operator: true
function_in_camel_caps: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: false
order_alphabetically: true
fix_line_ending: true
encourage_single_quotes: true
no_long_variable_names:
maximum: '20'
return_doc_comment_if_not_inferrable: true
simplify_boolean_return: true
properties_in_camelcaps: true
parameters_in_camelcaps: true
parameter_doc_comments: true
overriding_parameter: true
no_short_variable_names:
minimum: '3'
no_short_method_names:
minimum: '3'
no_new_line_at_end_of_file: true
no_goto: true
avoid_perl_style_comments: true