filter:
paths: [src/*]
excluded_paths: [vendor/*, tests/*]
before_commands:
- 'composer install --dev --prefer-dist'
tools:
external_code_coverage: true
php_mess_detector: true
php_code_sniffer: true
sensiolabs_security_checker: true
php_code_coverage: true
php_pdepend: true
php_loc:
enabled: true
excluded_dirs: [vendor, tests]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests]
php_cs_fixer:
config:
level: custom
fixers:
align_multiline_comment: true
array_indentation: true
array_syntax:
syntax: short
backtick_to_shell_exec: true
binary_operator_spaces: true
blank_line_after_namespace: true
blank_line_after_opening_tag: true
blank_line_before_statement:
statements:
- case
- continue
- declare
- default
- die
- do
- exit
- foreach
- goto
- if
- return
- throw
- try
- while
braces:
allow_single_line_closure: true
cast_spaces: true
class_attributes_separation: true
class_definition:
single_item_single_line: true
class_keyword_remove: false
combine_consecutive_issets: true
combine_consecutive_unsets: true
combine_nested_dirname: true
comment_to_phpdoc:
ignored_tags:
- noinspection
compact_nullable_typehint: true
concat_space:
spacing: one
constant_case: true
date_time_immutable: true
declare_equal_normalize: true
declare_strict_types: true
dir_constant: true
doctrine_annotation_array_assignment: true
doctrine_annotation_braces: true
doctrine_annotation_indentation: true
doctrine_annotation_spaces: true
elseif: true
encoding: true
ereg_to_preg: true
error_suppression:
mute_deprecation_error: true
noise_remaining_usages: true
noise_remaining_usages_exclude:
- fclose
- fopen
- gzinflate
- iconv
- mime_content_type
- rename
- unlink
escape_implicit_backslashes: true
explicit_indirect_variable: true
explicit_string_variable: true
final_class: false
final_internal_class: false
final_public_method_for_abstract_class: false
final_static_access: true
fopen_flag_order: true
fopen_flags:
b_mode: true
full_opening_tag: true
fully_qualified_strict_types: true
function_declaration: true
function_to_constant:
functions:
- get_class
- php_sapi_name
- phpversion
- pi
- get_called_class
function_typehint_space: true
general_phpdoc_annotation_remove: true
global_namespace_import:
import_constants: false
import_functions: false
import_classes: false
header_comment: false
heredoc_indentation: false
heredoc_to_nowdoc: true
implode_call: true
include: true
increment_style: false
indentation_type: true
is_null: true
line_ending: true
linebreak_after_opening_tag: true
list_syntax:
syntax: short
logical_operators: true
lowercase_cast: true
lowercase_keywords: true
lowercase_static_reference: true
magic_constant_casing: true
magic_method_casing: true
mb_str_functions: false
method_argument_space:
on_multiline: ensure_fully_multiline
method_chaining_indentation: true
modernize_types_casting: true
multiline_comment_opening_closing: true
multiline_whitespace_before_semicolons:
strategy: new_line_for_chained_calls
native_constant_invocation: true
native_function_casing: true
native_function_invocation:
include:
- '@compiler_optimized'
scope: namespaced
strict: true
native_function_type_declaration_casing: true
new_with_braces: true
no_alias_functions:
sets:
- '@all'
no_alternative_syntax: true
no_binary_string: true
no_blank_lines_after_class_opening: true
no_blank_lines_after_phpdoc: true
no_blank_lines_before_namespace: false
no_break_comment:
comment_text: 'no break'
no_closing_tag: true
no_empty_comment: true
no_empty_phpdoc: true
no_empty_statement: true
no_extra_blank_lines:
tokens:
- extra
- case
- continue
- default
- curly_brace_block
- parenthesis_brace_block
- return
- square_brace_block
- use
- throw
- use_trait
- useTrait
- switch
no_homoglyph_names: true
no_leading_import_slash: true
no_leading_namespace_whitespace: true
no_mixed_echo_print: true
no_multiline_whitespace_around_double_arrow: true
no_null_property_initialization: true
no_php4_constructor: true
no_short_bool_cast: true
no_short_echo_tag: false
no_singleline_whitespace_before_semicolons: true
no_spaces_after_function_name: true
no_spaces_around_offset: true
no_spaces_inside_parenthesis: true
no_superfluous_elseif: true
no_superfluous_phpdoc_tags: false
no_trailing_comma_in_list_call: true
no_trailing_comma_in_singleline_array: true
no_trailing_whitespace: true
no_trailing_whitespace_in_comment: true
no_unneeded_control_parentheses: true
no_unneeded_curly_braces: true
no_unneeded_final_method: true
no_unreachable_default_argument_value: true
no_unset_cast: true
no_unset_on_property: false
no_unused_imports: true
no_useless_else: true
no_useless_return: true
no_whitespace_before_comma_in_array: true
no_whitespace_in_blank_line: true
non_printable_character: true
normalize_index_brace: true
not_operator_with_space: false
not_operator_with_successor_space: false
nullable_type_declaration_for_default_null_value: true
object_operator_without_whitespace: true
ordered_class_elements: false
ordered_imports:
sort_algorithm: alpha
imports_order:
- class
- const
- function
ordered_interfaces: false
php_unit_construct: true
php_unit_dedicate_assert:
target: '5.6'
php_unit_dedicate_assert_internal_type:
target: '7.5'
php_unit_expectation: true
php_unit_fqcn_annotation: true
php_unit_internal_class: true
php_unit_method_casing: true
php_unit_mock: true
php_unit_mock_short_will_return: true
php_unit_namespaced: true
php_unit_no_expectation_annotation: true
php_unit_ordered_covers: true
php_unit_set_up_tear_down_visibility: true
php_unit_size_class: true
php_unit_strict: false
php_unit_test_annotation: true
php_unit_test_case_static_method_calls: true
php_unit_test_class_requires_covers: false
phpdoc_add_missing_param_annotation:
only_untyped: false
phpdoc_align:
tags:
- return
- throws
- type
- var
- property
- method
- param
align: vertical
phpdoc_annotation_without_dot: true
phpdoc_indent: true
phpdoc_inline_tag: true
phpdoc_line_span:
const: single
property: single
method: multi
phpdoc_no_access: true
phpdoc_no_alias_tag: true
phpdoc_no_empty_return: true
phpdoc_no_package: true
phpdoc_no_useless_inheritdoc: true
phpdoc_order: true
phpdoc_return_self_reference: true
phpdoc_scalar: true
phpdoc_separation: true
phpdoc_single_line_var_spacing: true
phpdoc_summary: true
phpdoc_to_comment: false
phpdoc_to_param_type: false
phpdoc_to_return_type: false
phpdoc_trim: true
phpdoc_trim_consecutive_blank_line_separation: true
phpdoc_types: true
phpdoc_types_order:
sort_algorithm: none
null_adjustment: always_last
phpdoc_var_annotation_correct_order: true
phpdoc_var_without_name: false
pow_to_exponentiation: true
protected_to_private: true
psr0: false
psr4: true
random_api_migration:
replacements:
mt_rand: random_int
rand: random_int
return_assignment: true
return_type_declaration: true
self_accessor: true
self_static_accessor: true
semicolon_after_instruction: true
set_type_to_cast: true
short_scalar_cast: true
simple_to_complex_string_variable: true
simplified_null_return: false
single_blank_line_at_eof: true
single_blank_line_before_namespace: true
single_class_element_per_statement: true
single_import_per_statement: true
single_line_after_imports: true
single_line_comment_style: true
single_line_throw: false
single_quote:
strings_containing_single_quote_chars: false
single_trait_insert_per_statement: true
space_after_semicolon: true
standardize_increment: true
standardize_not_equals: true
static_lambda: true
strict_comparison: true
strict_param: true
string_line_ending: true
switch_case_semicolon_to_colon: true
switch_case_space: true
ternary_operator_spaces: true
ternary_to_null_coalescing: true
trailing_comma_in_multiline_array: true
trim_array_spaces: true
unary_operator_spaces: true
visibility_required: true
void_return: true
whitespace_after_comma_in_array: true
yoda_style:
equal: false
identical: false
less_and_greater: false
build:
nodes:
analysis:
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
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: true
security_vulnerabilities: true
no_exit: true
properties_in_camelcaps: true
return_doc_comments: true
simplify_boolean_return: true
return_doc_comment_if_not_inferrable: true
remove_extra_empty_lines: true
phpunit_assertions: true
parameters_in_camelcaps: true
parameter_doc_comments: true
param_doc_comment_if_not_inferrable: true
overriding_parameter: true
no_long_variable_names:
maximum: '20'
no_goto: true
naming_conventions:
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)'
more_specific_types_in_doc_comments: true
fix_line_ending: true
check_method_contracts:
verify_interface_like_constraints: true
verify_documented_constraints: true
verify_parent_constraints: true
coding_style:
php: { }
filter:
excluded_paths:
- tests/*