This ruleset is a collection of important rules to run in a CI pipeline.
Total : 177 analysis
Adding Zero
Multiple Index Definition
Forgotten Visibility
Non Static Methods Called In A Static
Static Methods Called From Object
Constants With Strange Names
Redeclared PHP Functions
error_reporting() With Integers
Exit() Usage
Forgotten Whitespace
Multiply By One
@ Operator
Not Not
Strpos()-like Comparison
Throws An Assignement
var_dump()… Usage
Useless Instructions
Multiple Constant Definition
Wrong Optional Parameter
Use === null
One Variable String
Static Methods Can’t Contain $this
While(List() = Each())
Multiples Identical Case
Switch Without Default
Nested Ternary
Undefined Constants
Htmlentities Calls
Undefined Class Constants
Undefined Functions
Deprecated PHP Functions
Dangling Array References
Native Alias Functions Usage
Uses Default Values
Wrong Number Of Arguments
Use const
list() May Omit Variables
Or Die
Must Return Methods
Overwritten Exceptions
Foreach Reference Is Not Modified
Undefined Properties
Strict Comparison With Booleans
Lone Blocks
Logical Should Use Symbolic Operators
Repeated print()
Avoid Parenthesis With Language Construct
Objects Don’t Need References
No Real Comparison
No Direct Call To Magic Method
Useless Final
Use Constant Instead Of Function
Useless Unset
No array_merge() In Loops
Useless Parenthesis
Use PHP Object API
Altering Foreach Without Reference
Use Pathinfo
No Parenthesis For Language Construct
Use Constant As Arguments
Implied If
Should Chain Exception
Undefined Interfaces
Should Use Prepared Statement
Print And Die
Unchecked Resources
Else If Versus Elseif
Multiple Class Declarations
Empty Namespace
Could Use Short Assignation
Pre-increment
Indices Are Int Or String
Should Typecast
Avoid Substr() One
Useless Brackets
preg_replace With Option e
eval() Without Try
Avoid get_class()
Silently Cast Integer
Timestamp Difference
Wrong Parameter Type
Redefined Class Constants
Redefined Default
Wrong fopen() Mode
Negative Power
Use random_int()
Ternary In Concat
Undefined Trait
Identical Conditions
No Choice
Logical Mistakes
Same Conditions In Condition
Return True False
Could Use __DIR__
Should Use Coalesce
If With Same Conditions
Throw Functioncall
Use Instanceof
Results May Be Missing
Always Positive Comparison
Empty Blocks
Throw In Destruct
Use System Tmp
Hidden Use Expression
Should Make Alias
Multiple Identical Trait Or Interface
Multiple Alias Definitions
Failed Substr() Comparison
Should Use Ternary Operator
Drop Else After Return
Use ::Class Operator
Don’t Echo Error
Useless Type Casting
No isset() With empty()
Useless Check
Multiple Alias Definitions Per File
__DIR__ Then Slash
Repeated Regex
No Class In Global
Could Use str_repeat()
Strings With Strange Space
No Empty Regex
No Reference On Left Side
Assign And Lettered Logical Operator Precedence
No Magic Method With Array
Is Actually Zero
Unconditional Break In Loop
Next Month Trap
Printf Number Of Arguments
Invalid Regex
Same Variable Foreach
Identical On Both Sides
No Reference For Ternary
Unused Inherited Variable In Closure
Don’t Unset Properties
Strtr Arguments
Missing Parenthesis
Callback Function Needs Return
strpos() Too Much
Class-typed References
Check JSON
Undefined static ::class
Undefined Variable
Undefined Insteadof
Wrong Access Style to Property
Invalid Pack Format
Should Yield With Key
Useless Method Alias
Possible Missing Subpattern
Assign And Compare
Type Must Be Returned
Check On __Call Usage
Casting Ternary
Concat And Addition
Wrong Type Returned
Class Without Parent
Scalar Are Not Arrays
Implode() Arguments Order
strip_tags() Skips Closed Tag
Should Use Explode Args
Use array_slice()
Coalesce And Concat
Interfaces Is Not Implemented
No Literal For Reference
Can’t Implement Traversable
Is_A() With String
Mbstring Unknown Encoding
Mbstring Third Arg
Merge If Then
Wrong Type With Call
Not Equal Is Not !==
Wrong Typed Property Default
Wrong Type For Native PHP Function
Unknown Parameter Name
Missing Some Returntype
Htmlentities Using Default Flag
Wrong Argument Name With PHP Function
Short name
CI-checks
Available in
Entreprise Edition, Exakat Cloud
GETTING STARTED
USER GUIDE
REFERENCE GUIDE
ADMINISTRATOR GUIDE
OTHERS