Checkout Config
filter:
excluded_paths:
- tests/*
checks:
php:
code_rating: true
duplication: true
tools:
php_code_sniffer:
config:
standard: "PSR2"
sensiolabs_security_checker: true
Global Config
tools:
php_code_sniffer:
config:
standard: "WordPress"
checks:
php:
code_rating: true
duplication: true
variable_existence: true
useless_calls: true
use_statement_alias_conflict: true
unused_variables: true
unused_properties: true
unused_parameters: true
unused_methods: true
unreachable_code: true
sql_injection_vulnerabilities: true
security_vulnerabilities: true
precedence_mistakes: true
precedence_in_conditions: true
parameter_non_unique: true
no_property_on_interface: true
no_non_implemented_abstract_methods: true
deprecated_code_usage: true
closure_use_not_conflicting: true
closure_use_modifiable: true
avoid_useless_overridden_methods: true
avoid_conflicting_incrementers: true
assignment_of_null_return: true
avoid_usage_of_logical_operators: true
ensure_lower_case_builtin_functions: true
foreach_traversable: true
instanceof_class_exists: true
lowercase_basic_constants: true
lowercase_php_keywords: true
missing_arguments: true
no_commented_out_code: true
no_duplicate_arguments: true
no_else_if_statements: true
no_space_between_concatenation_operator: true
no_space_inside_cast_operator: true
no_trailing_whitespace: true
no_underscore_prefix_in_properties: true
no_unnecessary_if: true
no_unnecessary_function_call_in_for_loop: true
non_commented_empty_catch_block: true
php5_style_constructor: true
prefer_while_loop_over_for_loop: true
require_scope_for_methods: true
require_scope_for_properties: true
spacing_around_conditional_operators: true
spacing_around_non_conditional_operators: true
spacing_of_function_arguments: true
use_self_instead_of_fqcn: true
uppercase_constants: true
simplify_boolean_return: true
return_doc_comments: true
return_doc_comment_if_not_inferrable: true
phpunit_assertions: true
param_doc_comment_if_not_inferrable: true
parameter_doc_comments: true
optional_parameters_at_the_end: true
no_goto: true
newline_at_end_of_file: true
more_specific_types_in_doc_comments: true
encourage_single_quotes: true
encourage_postdec_operator: true
avoid_todo_comments: true
avoid_unnecessary_concatenation: true
avoid_perl_style_comments: true
avoid_multiple_statements_on_same_line: true
avoid_fixme_comments: true
psr2_switch_declaration: false
psr2_class_declaration: false
one_class_per_file: false
no_global_keyword: false
no_eval: true
no_exit: false
coding_standard:
name: WordPress
javascript:
var_never_initialized: true
var_sometimes_initialized: true
valid_typeof: true
use_isnan: true
unsafe_undefined: true
unsafe_mutable_variable_usage: true
no_with: true
no_var: true
no_unused_vars: true
no_use_before_define: true
no_unused_function: true
no_unused_expressions: true
no_unused_const: true
no_unused_assignment: true
no_unreachable: true
no_undefined: true
no_undef_init: true
no_undef: true
no_shadow_builtins: true
no_return_assign: true
no_redeclared_const: true
no_redeclare: true
no_process_exit: true
no_new_wrappers: true
no_new_require: true
no_new: true
no_new_func: true
no_native_reassign: true
no_label_var: true
no_invalid_regexp: true
no_inner_declarations: true
no_implied_eval: true
no_implicit_undefined_return: true
no_func_assign: true
no_extra_bind: true
no_extend_native: true
no_ex_assign: true
no_eval: true
no_empty_label: true
no_empty_class: true
no_empty: true
no_else_return: true
no_dupe_keys: true
no_delete_var: true
no_debugger: true
no_constant_condition: true
no_console: true
no_comma_dangle: true
no_caller: true
no_bitwise: true
no_alert: true
jsdoc_non_existent_params: true
jsdoc_no_duplicate_params: true
guard_for_in: true
duplicate_code: true
curly: true
consistent_return: true
code_rating: true
check_unused_parameters: true
check_unnecessary_return: true
check_unnecessary_continue: true
check_undeclared_vars: true
check_too_many_arguments: true
'check_switch_unintended label': true
check_switch_no_default: true
check_switch_default_only: true
check_switch_default_not_last: true
check_switch_ambiguous_test: true
check_loop_no_body: true
check_for_loops_test: true
coding_style:
php:
spaces:
before_parentheses:
closure_definition: true
within:
array_initializer: true
function_call: true
function_declaration: true
if: true
for: true
while: true
switch: true
catch: true
braces:
classes_functions:
class: end-of-line
function: end-of-line
closure: end-of-line
if:
opening: end-of-line
for:
opening: end-of-line
while:
opening: end-of-line
do_while:
opening: end-of-line
switch:
opening: end-of-line
try:
opening: end-of-line
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: lower