facebook pixelPHP Static Analysis Rules
BACK TO LIST

PHP rules

Codiga provides multiple set 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
      Medium

      Check cyclomatic complexity

      Learn more

      ExcessiveClassComplexity

      Best practice
      Medium

      Check class complexity

      ExcessiveClassLength

      Best practice
      Medium

      Check class maximum number of lines

      ExcessiveMethodLength

      Best practice
      Medium

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

      ExcessiveParameterList

      Best practice
      Medium

      Functions should not have more than 10 parameters

      ExcessivePublicCount

      Best practice
      Medium

      Classes should not have more than 55 attributes and functions

      NPathComplexity

      Best practice
      Medium

      Check function complexity

      TooManyFields

      Best practice
      Medium

      Keep the number of fields for classes under 15.

      TooManyMethods

      Best practice
      Medium

      Class has too many getters

      TooManyPublicMethods

      Best practice
      Medium

      Keep number of public methods in classes under 10.

      ErrorControlOperator

      Best practice
      Medium

      Remove error control operator.

      UndefinedVariable

      Best practice
      Medium

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