Repository Config
# language: # language:
checks:
php: true
before_commands:
- "composer install --prefer-source --no-interaction --no-dev"
tools:
php_code_sniffer:
enabled: true
config:
standard: PSR2
php_cs_fixer:
enabled: true
config:
level: psr2
php_mess_detector:
enabled: true
config:
rulesets:
- codesize
- unusedcode
- naming
- design
naming_rules:
short_variable: { minimum: 2 }
php_analyzer:
enabled: true
config:
checkstyle:
enabled: true
naming:
enabled: true
property_name: ^[_a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps
method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9_]*$ #Allow underscores & caps
parameter_name: ^[a-z][a-zA-Z0-9_]*$ # Allow underscores
local_variable: ^[a-zA-Z][a-zA-Z0-9_]*$ #Allow underscores & caps
exception_name: ^[a-zA-Z][a-zA-Z0-9]*Exception$
isser_method_name: ^(?:[_a-zA-Z]|__)[a-zA-Z0-9]*$ #Allow underscores & caps
Global Config
coding_style:
php:
spaces:
around_operators:
concatenation: true
braces:
classes_functions:
class: new-line
function: new-line
closure: new-line
for:
opening: new-line
while:
opening: new-line
do_while:
opening: new-line
switch:
opening: new-line
try:
opening: new-line
upper_lower_casing:
keywords:
general: lower
constants:
true_false_null: upper