Checkout Config
checks:
php:
code_rating: true
duplication: true
build_failure_conditions:
- 'project.metric_change("scrutinizer.quality", < -0.10)'
- 'elements.rating(<= D).exists' # No classes/methods with a rating of D or worse
- 'issues.label("coding-style").exists' # No coding style issues allowed
- 'issues.severity(>= MAJOR).exists' # New major or higher severity issues
- 'project.metric("scrutinizer.quality", < 9)' # Code Quality Rating drops below 9
- 'project.metric("scrutinizer.test_coverage", < 0.82)' # Code Coverage drops below 82%
- 'project.metric_change("scrutinizer.test_coverage", < -0.02)'
- 'patches.label("Doc Comments").exists' # No doc comments patches allowed
- 'patches.label("Spacing").exists' # No spacing patches allowed
build:
cache:
directories:
- vendor
- ~/.composer
dependencies:
override:
- composer install
environment:
mysql: false
postgresql: false
elasticsearch: false
redis: false
variables:
SYMFONY_ENV: 'test'
tests:
override:
-
command: phpcs-run # @see https://scrutinizer-ci.com/docs/tools/php/code-sniffer/
-
command: mkdir coverage && composer run-script coverage-clover
idle_timeout: 1200
coverage:
file: 'coverage/clover.xml'
format: 'php-clover'
tools:
php_analyzer:
enabled: true
config:
checkstyle:
enabled: true
naming:
isser_method_name: ^.*$
utility_class_name: ^.*$
doc_comment_fixes:
enabled: false
reflection_fixes:
enabled: false
use_statement_fixes:
enabled: false
simplify_boolean_return:
enabled: true
external_code_coverage: false
php_code_coverage: false
php_changetracking: true
php_cpd: true
php_cs_fixer: false
php_mess_detector: true
php_pdepend: true
sensiolabs_security_checker: true
filter:
paths:
- src/*
coding_style:
php:
spaces:
before_parentheses:
closure_definition: true
around_operators:
concatenation: false
Repository Config
checks:
php:
fix_php_opening_tag: false
remove_php_closing_tag: false
one_class_per_file: false
side_effects_or_types: false
no_mixed_inline_html: false
require_braces_around_control_structures: false
php5_style_constructor: false
no_global_keyword: false
avoid_usage_of_logical_operators: false
psr2_class_declaration: false
no_underscore_prefix_in_properties: false
no_underscore_prefix_in_methods: false
blank_line_after_namespace_declaration: false
single_namespace_per_use: false
psr2_switch_declaration: false
psr2_control_structure_declaration: false
avoid_superglobals: false
security_vulnerabilities: false
no_exit: false
filter: { }
coding_style:
php: { }
build: true