Rules
This list contains one hundred fourteen rules, in five categories.
Possible Errors
The following rules signal possible mistakes in the code.
Good Practices
The following rules are common sense practices that help avoid bugs or conflicts.
- always-have-visibility
- always-typehint
- always-use-semicolon
- avoid-magic-number
- avoid-those-functions
- commented-fallthrough
- compatible-typehint
- constant-condition
- declares-or-executes
- definitions-only
- imported-collision
- leave-last-closing-out
- lowercase-keyword
- no-array_merge-in-loop
- no-assign-null-from-method
- no-bracketless-blocks
- no-catch-overwrite
- no-commented-code
- no-curly-array
- no-dead-code
- no-deep-definitions
- no-double-comparisons
- no-double-quote
- no-duplicate-case
- no-duplicate-key
- no-duplicated-code
- no-empty-blocks
- no-empty-catch
- no-executable
- no-exit
- no-extra-argument
- no-global
- no-goto
- no-hardcoded-path
- no-implied-cast
- no-implied-if
- no-incompilable
- no-isolated-block
- no-missing-argument
- no-mixed-loops
- no-multiple-instruction-per-line
- no-nested-ternary
- no-noscream
- no-obsolete-directives
- no-obsolete-extensions
- no-php4-class-syntax
- no-raw-exceptions
- no-references-on-objects
- no-reserved-keywords
- no-static-this
- no-switch-with-multiple-default
- no-switch-without-default
- no-unchecked-resources
- no-undefined-properties
- no-undefined-variables
- no-unresolved-catch
- no-unresolved-instanceof
- no-unresolved-use
- no-unthrown-exceptions
- no-unused-arguments
- no-unused-method
- no-unused-property
- no-unused-variable
- no-useless-argument-reference
- no-useless-final
- no-useless-flowcontrol
- no-useless-instruction
- no-useless-interfaces
- no-useless-math
- no-useless-return
- no-useless-unset
- no-useless-use
- not-a-method
- one-class-per-file
- properties-always-used-locally
- strict-comparisons
- use-const
- use-constant-not-function
- use-foreach
- use-object-api
- use-provided-constants
- use-self
Security
The following rules help strengthening the security of your application.
PHP Manual recommendations
The following rules are extracted from the manual.
- all-unique-arguments
- argument-with-default-at-the-end
- assigning-to-array-with-list
- no-aliases
- no-buried-assignation
- no-constant-as-array-keys
- no-deprecated
- no-direct-call-to-magic-method
- no-incompatible-reference
- no-letter-logical
- no-parenthesis-for-language-construct
- no-reassign-references
- no-short-tags
- no-unnecessary-string-concatenation
- use-properties-default-values
- use-smart-autoload
Performances
The following rules will speed up the code execution.