Checkout Config
filter:
excluded_paths: [vendor/*, examples/*, tests/*]
before_commands:
- 'composer --prefer-source install'
- 'cp phpunit.xml.dist phpunit.xml'
coding_style:
php:
indentation:
general:
use_tabs: false
switch:
indent_case: true
spaces:
before_parentheses:
closure_definition: true
array_initializer: false
around_operators:
concatenation: true
within:
array_initializer: true
ternary_operator:
in_short_version: true
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: lower
tools:
external_code_coverage:
enabled: true
timeout: 1800 # Timeout in seconds.
php_mess_detector:
config:
ruleset: build/config/phpmd.xml
php_analyzer:
config:
parameter_reference_check: { enabled: false }
checkstyle: { enabled: false, no_trailing_whitespace: true }
unreachable_code: { enabled: true }
check_access_control: { enabled: false }
typo_checks: { enabled: true }
check_variables: { enabled: true }
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 }
dead_assignments: { enabled: true }
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 }
loops_must_use_braces: { enabled: true }
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 }
simplify_boolean_return: { enabled: true }
phpunit_checks: { enabled: true }
reflection_checks: { enabled: false }
precedence_checks: { enabled: true, assignment_in_condition: true, comparison_of_bit_result: true }
basic_semantic_checks: { enabled: true }
doc_comment_fixes: { enabled: true }
reflection_fixes: { enabled: false }
use_statement_fixes: { enabled: true, remove_unused: true, preserve_multiple: false, order_alphabetically: false }
php_code_sniffer:
config:
ruleset: build/config/phpcs.xml
php_cs_fixer:
enabled: false
config:
level: psr2
fixers:
indentation: false
linefeed: true
trailing_spaces: true
unused_use: true
phpdoc_params: false
visibility: true
return: false
short_tag: true
braces: false
include: true
php_closing_tag: true
extra_empty_lines: true
controls_spaces: true
elseif: true
eof_ending: true
php_code_coverage:
enabled: true
config_path: phpunit.xml.dist
php_pdepend: true
php_loc:
enabled: true
excluded_dirs: [vendor, tests, examples]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests, examples]
php_sim: false
sensiolabs_security_checker:
enabled: true
Repository Config
filter:
excluded_paths:
- 'tests/*'
checks:
php:
uppercase_constants: true
newline_at_end_of_file: true
coding_style:
php:
indentation:
general:
use_tabs: false
switch:
indent_case: true
spaces:
before_parentheses:
closure_definition: true
array_initializer: true
around_operators:
concatenation: true
within:
array_initializer: true
ternary_operator:
in_short_version: true
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: lower