Checkout Config
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
build:
environment:
php: '5.4.41'
before_commands:
- "composer install --prefer-source"
tools:
# Code Coverage
php_code_coverage:
enabled: true
filter:
excluded_paths:
- 'tests/*'
# Code Sniffer
php_code_sniffer:
enabled: true
config:
standard: PSR2
filter:
excluded_paths:
- 'tests/*'
# Copy/Paste Detector
php_cpd:
enabled: true
command: phpcpd
excluded_dirs:
- 'tests'
# Analyzes the size and structure of a PHP project.
php_loc:
enabled: true
command: phploc
excluded_dirs:
- tests
# PHP Mess Detector (http://phpmd.org).
php_mess_detector:
enabled: true
command: phpmd
config:
rulesets:
- codesize
- unusedcode
- naming
- design
- controversial
filter:
excluded_paths:
- 'tests/*'
# Analyzes the size and structure of a PHP project.
php_pdepend:
enabled: true
command: pdepend
excluded_dirs:
- tests
# Runs Scrutinizer's PHP Analyzer Tool
php_analyzer:
enabled: true
config:
verify_php_doc_comments:
suggest_more_specific_types: false
filter:
excluded_paths:
- 'tests/*'
# Security Advisory Checker
sensiolabs_security_checker: true
Repository Config
checks:
php:
code_rating: true
duplication: true
Global Config
checks:
php:
verify_property_names: true
verify_argument_usable_as_reference: true
verify_access_scope_valid: true
variable_existence: true
useless_calls: true
use_statement_alias_conflict: true
use_self_instead_of_fqcn: true
uppercase_constants: true
unused_variables: true
unused_properties: true
unused_parameters: true
unused_methods: true
unreachable_code: true
too_many_arguments: true
symfony_request_injection: true
switch_fallthrough_commented: true
sql_injection_vulnerabilities: true