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.

CyclomaticComplexity

Best practice
Warning

Check cyclomatic complexity

Learn more

ExcessiveClassComplexity

Best practice
Warning

Check class complexity

ExcessiveClassLength

Best practice
Warning

Check class maximum number of lines

ExcessiveMethodLength

Best practice
Warning

Check max number of lines of functions (100 by default)

ExcessiveParameterList

Best practice
Warning

Functions should not have more than 10 parameters

ExcessivePublicCount

Best practice
Warning

Classes should not have more than 55 attributes and functions

NPathComplexity

Best practice
Warning

Check function complexity

TooManyFields

Best practice
Warning

Keep the number of fields for classes under 15.

TooManyMethods

Best practice
Warning

Class has too many getters

TooManyPublicMethods

Best practice
Warning

Keep number of public methods in classes under 10.

DuplicatedArrayKey

Best practice
Error

Duplicate array key

ErrorControlOperator

Best practice
Warning

Remove error control operator.

UndefinedVariable

Best practice
Warning

Avoid using undefined variables, it will lead to PHP notices.

We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.