Repository Config
build:
nodes:
analysis:
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
environment:
node:
version: 6.0.0
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
coding_style:
php:
indentation:
general:
use_tabs: true
filter: { }
Global Config
build:
dependencies:
before:
- command: 'sudo apt-get install -y zip unzip'
- command: "wget --no-check-certificate http://wpimage.atm-consulting.fr/scrutinizer/dolibarr-15.0.2.zip"
- command: 'unzip dolibarr-15.0.2.zip -d ./dependencies'
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
filter:
excluded_paths:
- "tests/"
# Everything in a root level "tests" directory will be excluded
dependency_paths:
- dependencies/*
tools:
# php_analyzer. Doc on https://scrutinizer-ci.com/docs/tools/php/php-analyzer/
php_analyzer:
enabled: true
extensions:
- php
dependency_paths:
- dependencies/*
config:
parameter_reference_check:
enabled: true
checkstyle:
enabled: false
no_trailing_whitespace: true
naming:
enabled: true
local_variable: ^[a-z][a-zA-Z0-9]*$
abstract_class_name: ^Abstract|Factory$
utility_class_name: Utils?$
constant_name: ^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$
property_name: ^[a-z][a-zA-Z0-9]*$
method_name: ^(?:[a-z]|__)[a-zA-Z0-9]*$
parameter_name: ^[a-z][a-zA-Z0-9]*$
interface_name: ^[A-Z][a-zA-Z0-9]*Interface$
type_name: ^[A-Z][a-zA-Z0-9]*$
exception_name: ^[A-Z][a-zA-Z0-9]*Exception$
isser_method_name: ^(?:is|has|should|may|supports)
checks:
php:
verify_property_names: true
verify_argument_usable_as_reference: false
verify_access_scope_valid: true
variable_existence: true
unused_properties: true
unused_variables: true
use_statement_alias_conflict: true
useless_calls: false
unused_parameters: true
too_many_arguments: false
symfony_request_injection: false
switch_fallthrough_commented: false
sql_injection_vulnerabilities: false
security_vulnerabilities: false
require_scope_for_methods: false
require_php_tag_first: false
property_assignments: false
precedence_mistakes: false
precedence_in_conditions: false
parse_doc_comments: false
parameter_non_unique: true
non_commented_empty_catch_block: false
no_trait_type_hints: false
no_trailing_whitespace: false
no_exit: false
foreach_usable_as_reference: false
fix_doc_comments: false
encourage_shallow_comparison: false
duplication: false
deprecated_code_usage: false
deadlock_detection_in_loops: false
code_rating: true
closure_use_modifiable: false
call_to_parent_method: false
avoid_superglobals: true
avoid_entity_manager_injection: false
avoid_closing_tag: false