facebook pixelCodiga Analysis PHP Rules, category design
BACK TO LIST

PHP rules

Codiga provides multiple sets of rules for 12+ languages. Below we provide a link and a description for all the rules supported by our platform. Note that not all the rules are being listed and described below.

BooleanGetMethodName

Design
Informational

getter methods which returns a boolean should be named 'is...()' or 'has...()'

Learn more

CouplingBetweenObjects

Design
Error

Check that classes do not have higher coupling

DepthOfInheritance

Design
Informational

Ensure that class hirearchy is not too large

DevelopmentCodeFragment

Design
Error

Do not call print\_r in production call

EvalExpression

Design
Informational

Check for eval expression.

ExitExpression

Design
Critical

Check exit expression in functions

GotoStatement

Design
Informational

Do not use goto

LongVariable

Design
Warning

Avoid long variables names (more than 20 characters)

NumberOfChildren

Design
Error

Ensure class has less than 15 children

ShortMethodName

Design
Warning

Avoid short methods names (more than 3 characters)

ShortVariable

Design
Warning

Avoid short variables names (more than 3 charactrs)

CountInLoopExpression

Design
Error

Avoid count()/sizeof() in the a loop

ShortClassName

Design
Warning

Avoid short class names.