PHP Static analysis for public

Label Recipes Issues Files Severity Frequence
Ambiguous Array Index Analyze, All, Simple, Level 2, Semantics, ChangedBehavior 2 1 Minor 10 %
Null Or Boolean Arrays All, Analyze 3 2 Minor 0 %
Weak Type With Array All, Analyze, ChangedBehavior 142 49 Minor 0 %
Missing Attribute Attribute All, Analyze, Attributes, PHP recommendations, ChangedBehavior 18 18 Minor 0 %
Abstract Or Implements All, Analyze, LintButWontExec, ChangedBehavior 163 163 Major 24 %
Ambiguous Static All, Analyze, Semantics, ChangedBehavior 20 19 Minor 66 %
Ambiguous Visibilities All, Analyze, Semantics, ChangedBehavior 213 117 Minor 70 %
Avoid Optional Properties All, Analyze, ChangedBehavior 21 12 Major 84 %
Check After Null Safe Operator All, Analyze, Suggestions, ChangedBehavior 9 5 Major 0 %
Class, Interface, Enum Or Trait With Identical Names Analyze, All, ChangedBehavior 8 8 Minor 19 %
Could Be Abstract Class All, Analyze, ClassReview, ChangedBehavior 10 10 Minor 65 %
Class Could Be Final All, Analyze, ClassReview, ChangedBehavior 363 363 Minor 96 %
Method Could Be Static All, Analyze, ClassReview, ChangedBehavior 132 63 Minor 92 %
Could Inject Parameter All, Analyze, ClassReview, ChangedBehavior 54 30 Minor 0 %
Cyclic References All, Analyze, ClassReview, ChangedBehavior 1 1 Minor 0 %
Dependant Abstract Classes All, Analyze, ClassReview, ChangedBehavior 1 1 Minor 0 %
No Direct Call To Magic Method Analyze, All, Level 2, CI-checks, CE 3 1 Major 43 %
Don't Send $this In Constructor All, Analyze, ChangedBehavior 1 1 Minor 41 %
Don't Unset Properties All, Analyze, Top10, php-cs-fixable, CI-checks, ChangedBehavior, CE 1 1 Major 42 %
Implicit Nullable Type All, Analyze, ClassReview, ChangedBehavior 1 1 Minor 0 %
Incompatible Signature Methods With Covariance All, Analyze, ChangedBehavior 18 18 Critical 0 %
Inherited Property Type Must Match All, Analyze, LintButWontExec, ClassReview, ChangedBehavior 2 2 Minor 0 %
Assign Default To Properties Analyze, ClearPHP, All, Simple, Level 2, ChangedBehavior 1 1 Minor 71 %
Method Signature Must Be Compatible All, Analyze, LintButWontExec, ChangedBehavior 37 33 Critical 53 %
Mismatch Properties Typehints All, Analyze, LintButWontExec, ClassReview, ChangedBehavior 14 6 Minor 0 %
New Object Then Immediate Call All, Analyze, ClassReview 18 12 Minor 0 %
No Null With Null Safe Operator All, Analyze, ClassReview, ChangedBehavior 17 12 Minor 0 %
self, parent, static Outside Class All, Analyze, LintButWontExec, ChangedBehavior 61 1 Major 8 %
No Readonly Assignation In Global All, Analyze, ClassReview, ChangedBehavior 56 14 Minor 0 %
Non Nullable Getters All, Analyze, ClassReview, ChangedBehavior 75 40 Minor 0 %
Parent First All, Analyze, Suggestions, ChangedBehavior 2 2 Minor 56 %
Property Could Be Local All, Analyze, ClassReview, ChangedBehavior 336 127 Minor 76 %
Same Name For Property And Method All, Analyze, ClassReview, Semantics, ChangedBehavior 4 1 Minor 0 %
Never Used Properties Analyze, All, Simple, Unused, ChangedBehavior 46 25 Minor 71 %
Property Used In One Method Only All, Analyze, ChangedBehavior 411 168 Minor 84 %
Scalar Or Object Property All, Analyze 1 1 Minor 32 %
Could Use self Analyze, All, Simple, Suggestions, Level 3, ClassReview, ChangedBehavior 1 1 Minor 63 %
Should Use Local Class Analyze, ClearPHP, All, Simple, ChangedBehavior 133 57 Minor 95 %
Static Methods Called From Object Analyze, All, Simple, CI-checks, ChangedBehavior, CE 5 3 Minor 50 %
Swapped Arguments All, Analyze, ChangedBehavior 1 1 Critical 0 %
Too Many Dereferencing All, Analyze, ChangedBehavior 5 5 Minor 0 %
Undefined Classes Analyze, All, Stubs, Undefined 306 60 Major 91 %
Undefined Class Constants Analyze, All, CI-checks, Stubs, LintButWontExec, Undefined, ChangedBehavior, CE 292 72 Major 62 %
Undefined Properties Analyze, ClearPHP, All, Simple, CI-checks, CompatibilityPHP82, Undefined, ChangedBehavior, CE 52 17 Major 61 %
Undefined ::class All, Analyze, CI-checks, Undefined, ChangedBehavior, CE 1 1 Major 36 %
Unfinished Object All, Analyze, ClassReview, ChangedBehavior 625 232 Major 0 %
Unreachable Method All, Analyze, Dead code, ClassReview, Unused, ChangedBehavior 4 4 Minor 0 %
Unresolved Classes Analyze, All, Stubs, ChangedBehavior 167 40 Major 76 %
Unused Classes Dead code, All, Simple, Analyze, Unused, ChangedBehavior 2 2 Major 67 %
Unused Class Constant All, Analyze, ClassReview, Unused, ChangedBehavior 25 8 Minor 0 %
Unused Public Methods All, Analyze, ChangedBehavior 846 255 Minor 0 %
Use Instanceof Analyze, All, Simple, CI-checks, ChangedBehavior, CE 13 9 Major 63 %
Used Once Property All, Analyze, ChangedBehavior 253 136 Minor 74 %
Weak Typing All, Analyze, ChangedBehavior 19 13 Minor 47 %
Wrong Typed Property Default All, Analyze, LintButWontExec, ClassReview, CI-checks, CE 32 18 Minor 0 %
Constant Used Only Once All, Analyze, ChangedBehavior 91 22 Minor 0 %
Unused Enumeration Case All, Analyze, Dead code, Unused, ChangedBehavior 26 1 Minor 0 %
Catch With Undefined Variable All, Analyze, Undefined, ChangedBehavior 10 5 Minor 0 %
Converted Exceptions All, Analyze, ChangedBehavior 36 17 Minor 0 %
Forgotten Thrown All, Analyze, ChangedBehavior 3 1 Minor 20 %
Overwritten Exceptions Analyze, All, Simple, Suggestions, Level 4, CI-checks, ChangedBehavior, CE 1 1 Minor 22 %
Throw Raw Exceptions All, Analyze, Suggestions, ChangedBehavior 36 14 Minor 0 %
Uncaught Exceptions Analyze, All, ChangedBehavior 138 44 Minor 84 %
Unthrown Exception Analyze, Dead code, ClearPHP, All, Simple, ChangedBehavior 9 9 Minor 45 %
Useless Try All, Analyze, ChangedBehavior 50 35 Minor 0 %
Use Named Boolean In Argument Definition All, Analyze, ChangedBehavior 42 27 Minor 84 %
Can't Call Generator All, Analyze 4 3 Minor 0 %
Could Make A Function All, Analyze, Suggestions, ChangedBehavior 34 22 Minor 66 %
Empty Function Analyze, All, Simple, ChangedBehavior 168 149 Minor 74 %
Fn Argument Variable Confusion All, Analyze, Semantics, ChangedBehavior 4 3 Minor 0 %
Hardcoded Passwords Analyze, OneFile, Security, All, Simple, Level 3, ChangedBehavior 7 5 Major 70 %
Insufficient Typehint All, Analyze, Typechecks, ChangedBehavior 26 21 Major 43 %
Method Is Not An If All, Analyze 18 11 Minor 0 %
Mismatch Type And Default All, Analyze, LintButWontExec, Typechecks, ChangedBehavior 9 5 Critical 8 %
Mismatched Default Arguments All, Analyze, Typechecks, ChangedBehavior 26 9 Minor 80 %
Mismatched Typehint All, Analyze, Typechecks, ChangedBehavior 196 54 Major 66 %
Modified Typed Parameter All, Analyze, ClassReview, ChangedBehavior 6 5 Minor 0 %
Must Return Methods Analyze, All, Simple, Level 2, LintButWontExec, CI-checks, ChangedBehavior, CE 5 5 Major 34 %
Never Called Parameter All, Analyze, Suggestions, Rector, Unused 46 40 Minor 92 %
No Boolean As Default All, Analyze 7 4 Minor 84 %
No Return Used All, Analyze, Suggestions, Level 4, ChangedBehavior 94 56 Minor 69 %
Should Use Existing Constants Analyze, All, Simple, ChangedBehavior 1 1 Minor 32 %
Too Many Local Variables All, Analyze 4 4 Minor 64 %
Type Must Be Returned All, Analyze, LintButWontExec, CI-checks, ChangedBehavior, CE 5 5 Major 22 %
Undefined Functions Analyze, All, CI-checks, Stubs, Undefined, CE 5 3 Major 68 %
Unknown Parameter Name All, Analyze, CI-checks, ChangedBehavior, CE 336 39 Minor 0 %
Unused Parameter Analyze, All, Simple, Unused 23 12 Major 90 %
Unused Returned Value All, Analyze, OneFile, Dead code, Simple, Unused 205 76 Minor 41 %
Useless Referenced Argument All, Analyze, ChangedBehavior 2 2 Minor 58 %
Uses Default Values Analyze, All, Simple, CI-checks, ChangedBehavior, CE 1098 173 Minor 98 %
Using Deprecated Method All, Analyze, Attributes 5 2 Minor 0 %
Methods Without Return All, Analyze 25 25 Minor 95 %
Wrong Argument Type All, Analyze, Typechecks, ChangedBehavior 3 3 Minor 0 %
Wrong Number Of Arguments Analyze, OneFile, All, Simple, CI-checks, Stubs, ChangedBehavior, CE 37 26 Major 81 %
Wrong Type Returned All, Analyze, ClassReview, CI-checks, LintButWontExec, ChangedBehavior, CE 312 184 Minor 0 %
Wrong Type With Call All, Analyze, Typechecks, CI-checks, ChangedBehavior, CE 433 106 Minor 0 %
Forgotten Interface All, Analyze, ChangedBehavior 6 6 Minor 48 %
Empty Interfaces Analyze, All, Simple, ChangedBehavior 3 3 Minor 41 %
Undefined Interfaces Analyze, All, CI-checks, LintButWontExec, Undefined, ChangedBehavior, CE 145 57 Major 72 %
Useless Interfaces Analyze, ClearPHP, All, Simple, ClassReview, Typechecks, ChangedBehavior 4 4 Minor 59 %
Multiple Alias Definitions Analyze, All, Simple, CI-checks, ChangedBehavior, CE 214 163 Minor 44 %
Should Make Alias Analyze, OneFile, All, Simple, CI-checks, ChangedBehavior, CE 110 17 Minor 46 %
Unresolved Use Analyze, ClearPHP, All, Simple, ChangedBehavior 347 136 Major 69 %
No array_merge() In Loops Analyze, Performances, ClearPHP, All, Simple, Level 2, Top10, CI-checks, ChangedBehavior, CE 12 8 Major 57 %
Logical To in_array All, Analyze, Level 2, ChangedBehavior 6 5 Minor 67 %
Use array_slice() All, Analyze, CI-checks, ChangedBehavior, CE 1 1 Minor 0 %
array_key_exists() Works On Arrays All, CompatibilityPHP74, Analyze, ChangedBehavior, CE 5 4 Minor 0 %
Assumptions All, Analyze, ChangedBehavior 48 29 Minor 0 %
Use random_int() Analyze, Security, All, CompatibilityPHP71, Simple, Level 2, CI-checks, ChangedBehavior, CE 9 4 Major 59 %
Deprecated PHP Functions Analyze, All, CI-checks, CE 2 1 Major 23 %
False To Array Conversion All, LintButWontExec, CompatibilityPHP81, CompatibilityPHP82, Analyze, ChangedBehavior 2 1 Minor 0 %
Wrong Parameter Type Analyze, OneFile, All, Simple, CI-checks, ChangedBehavior, CE 12 8 Major 76 %
PHP Native Interfaces and Return Type All, Analyze, LintButWontExec, CompatibilityPHP81, Deprecated, ChangedBehavior 31 31 Minor 0 %
Possible Missing Subpattern All, Analyze, Top10, CI-checks, ChangedBehavior, CE 1 1 Minor 45 %
PHP Native Class Type Compatibility All, Analyze, CompatibilityPHP81, ChangedBehavior 42 32 Major 0 %
No Null For Native PHP Functions All, Analyze, CompatibilityPHP81, Deprecated, ChangedBehavior 49 29 Minor 0 %
Scalar Are Not Arrays All, Analyze, CompatibilityPHP74, CI-checks, ChangedBehavior, CE 3 2 Minor 0 %
Should Use Coalesce Analyze, All, Simple, Suggestions, Level 3, CI-checks, ChangedBehavior, CE 6 5 Major 71 %
Too Many Native Calls All, Analyze, ChangedBehavior 7 5 Minor 49 %
Use PHP Object API Analyze, ClearPHP, All, Simple, CI-checks, ChangedBehavior, CE 4 2 Minor 27 %
Avoid Using stdClass All, Analyze, OneFile, Simple, Level 4 2 2 Minor 46 %
Wrong Attribute Configuration All, Analyze, ChangedBehavior 77 17 Minor 0 %
Wrong Type For Native PHP Function All, Analyze, CI-checks, ChangedBehavior, CE 93 46 Minor 0 %
Adding Zero Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks, Rector, CE 1 1 Minor 69 %
Comparison Is Always The Same All, Analyze, ChangedBehavior 30 22 Minor 0 %
Bail Out Early All, Analyze, OneFile, Simple, Level 4, ChangedBehavior 14 11 Minor 64 %
Strict Comparison With Booleans Analyze, All, Simple, Suggestions, Level 2, CI-checks, ChangedBehavior, CE 15 10 Minor 77 %
Buried Assignation Analyze, All, ChangedBehavior 26 12 Minor 84 %
Cast To Boolean Analyze, OneFile, All, Simple, Level 1, ChangedBehavior 1 1 Minor 56 %
Check All Types All, Analyze, ChangedBehavior 1 1 Major 69 %
Check Division By Zero All, Analyze, ChangedBehavior 11 3 Minor 0 %
Check JSON All, Analyze, CI-checks, CE 3 1 Major 65 %
Coalesce And Concat All, Analyze, CI-checks, ChangedBehavior, CE 7 5 Minor 0 %
Could Be Else All, Analyze, ChangedBehavior 1 1 Minor 49 %
Could Use __DIR__ Analyze, All, Simple, Suggestions, Level 3, php-cs-fixable, CI-checks, ChangedBehavior, CE 9 8 Major 56 %
Dangling Array References PHP recommendations, Analyze, ClearPHP, All, Simple, Level 1, Top10, CI-checks, ChangedBehavior, CE 1 1 Major 46 %
Default Then Discard All, Analyze, Readability, ChangedBehavior 1 1 Minor 0 %
Don't Change The Blind Var All, Analyze, ChangedBehavior 7 6 Minor 73 %
Don't Mix ++ All, Analyze, ChangedBehavior 7 4 Minor 56 %
Double Checks All, Analyze, ChangedBehavior 1 1 Minor 0 %
Echo With Concat Performances, Analyze, All, Simple, Suggestions, ChangedBehavior 1 1 Minor 60 %
Empty Json Error All, Analyze, ChangedBehavior 1 1 Minor 0 %
Empty Try Catch Analyze, All, Level 3 15 12 Minor 49 %
Identical Consecutive Expression All, Analyze, ChangedBehavior 1 1 Minor 59 %
If With Same Conditions Analyze, All, Simple, CI-checks, ChangedBehavior, CE 1 1 Major 47 %
Implied If Analyze, ClearPHP, All, Simple, CI-checks, Rector, ChangedBehavior, CE 2 2 Major 33 %
Indices Are Int Or String Analyze, OneFile, All, Simple, CI-checks, ChangedBehavior, CE 10 2 Major 20 %
Infinite Recursion All, Analyze, ChangedBehavior 5 5 Major 0 %
Invalid Cast All, Analyze, LintButWontExec, ChangedBehavior 9 2 Minor 0 %
Long Arguments All, Analyze, ChangedBehavior 28 2 Minor 68 %
Max Level Of Nesting All, Analyze, ChangedBehavior 1 1 Minor 0 %
Merge If Then All, Analyze, CI-checks, ChangedBehavior, CE 2 2 Minor 0 %
Mismatched Ternary Alternatives All, Analyze, Suggestions, Level 4, ChangedBehavior 1 1 Major 64 %
Missing Assignation In Branches All, Analyze, ChangedBehavior 11 9 Minor 0 %
Missing Cases In Switch All, Analyze, ChangedBehavior 6 2 Minor 36 %
Misused Yield All, Analyze, ChangedBehavior 5 5 Minor 0 %
Nested Ifthen Analyze, All, RadwellCodes, ChangedBehavior 3 3 Major 84 %
Nested Ternary Analyze, ClearPHP, All, Simple, Level 1, CI-checks, ChangedBehavior, CE 11 4 Major 50 %
No Choice Analyze, All, Simple, Level 2, Top10, CI-checks, Rector, ChangedBehavior, CE 15 11 Major 42 %
No Hardcoded Path Analyze, ClearPHP, All, Simple, ChangedBehavior 1 1 Major 35 %
No Need For Triple Equal All, Analyze, ChangedBehavior 35 18 Minor 0 %
No Null For Index All, Analyze, ChangedBehavior 8 2 Minor 0 %
Variable Is Not A Condition All, Analyze, ChangedBehavior 22 16 Minor 93 %
Non Integer Nor String As Index All, Analyze, ChangedBehavior 9 1 Minor 0 %
Repeated Regex All, Analyze, Level 1, CI-checks, ChangedBehavior, CE 4 3 Minor 47 %
Results May Be Missing Analyze, All, Simple, CI-checks, ChangedBehavior, CE 1 1 Major 24 %
Same Conditions In Condition Analyze, All, Simple, CI-checks, ChangedBehavior, CE 1 1 Critical 55 %
Should Chain Exception Analyze, All, Simple, CI-checks, ChangedBehavior, CE 5 3 Minor 39 %
Preprocessable Analyze, All, Rector, ChangedBehavior 35 21 Minor 85 %
Suspicious Comparison All, Analyze, Level 3, ChangedBehavior 1 1 Major 39 %
Switch Without Default Analyze, ClearPHP, All, Simple, CI-checks, ChangedBehavior, CE 13 11 Major 69 %
Test Then Cast All, Analyze, ChangedBehavior 1 1 Major 34 %
Timestamp Difference Analyze, All, Simple, Level 3, CI-checks, ChangedBehavior, CE 1 1 Major 49 %
Unchecked Resources Analyze, ClearPHP, All, Simple, Level 2, CI-checks, ChangedBehavior, CE 3 3 Major 50 %
Unconditional Break In Loop All, Analyze, Level 3, CI-checks, CE 6 6 Major 48 %
Unpreprocessed Values Analyze, OneFile, ClearPHP, All, Simple, Performances, ChangedBehavior 1 1 Minor 30 %
Unsupported Types With Operators All, Analyze, CompatibilityPHP80, ChangedBehavior, CE 8 5 Minor 0 %
Use Constant Instead Of Function PHP recommendations, All, Analyze, php-cs-fixable, CI-checks, ChangedBehavior, CE 9 8 Minor 61 %
Use Positive Condition All, Analyze, OneFile, Simple, ChangedBehavior 2 2 Minor 82 %
Use System Tmp Analyze, All, Simple, Level 3, CI-checks, ChangedBehavior, CE 1 1 Major 2 %
Useless Type Casting All, PHP recommendations, Analyze, OneFile, RadwellCodes, Simple, Level 4, CI-checks, ChangedBehavior, CE 7 4 Minor 47 %
Useless Coalesce All, Analyze, ChangedBehavior 9 8 Minor 0 %
Useless Instructions Analyze, OneFile, ClearPHP, All, Simple, Level 1, CI-checks, ChangedBehavior, CE 12 10 Minor 63 %
Useless Null Coalesce All, Analyze, Typehints, ChangedBehavior 10 8 Minor 0 %
Useless Parenthesis Analyze, All, Simple, CI-checks, ChangedBehavior, CE 14 5 Minor 81 %
Useless Short Ternary All, Analyze, ChangedBehavior 7 6 Minor 0 %
Useless Switch Analyze, All, Simple, ChangedBehavior 1 1 Major 32 %
Dependant Trait Analyze, All, Level 3, ChangedBehavior 1 1 Minor 28 %
Trait Is Not A Type All, Analyze, ClassReview, Typehints 2 1 Minor 0 %
Should Typecast Analyze, OneFile, All, Simple, CI-checks, Rector, ChangedBehavior, CE 1 1 Minor 49 %
Missing Some Returntype All, Typehints, Analyze, CI-checks, ChangedBehavior, CE 214 136 Minor 0 %
StandaloneType True False Null All, Appcontent, Analyze, ChangedBehavior 683 170 Minor 0 %
Wrong Type With Default All, Analyze, LintButWontExec, ClassReview, ChangedBehavior 155 82 Minor 0 %
Assigned Twice All, Analyze, ChangedBehavior 12 6 Minor 79 %
Overwritten Literals Analyze, All, ChangedBehavior 13 6 Major 79 %
Recycled Variables All, Analyze 4 2 Minor 0 %
Undefined Variable All, Analyze, CI-checks, Undefined, CE 3 1 Minor 77 %
Used Once Variables (In Scope) Analyze, ClearPHP, OneFile, All, Simple, Level 4, ChangedBehavior, CE 1404 207 Minor 95 %
Written Only Variables Analyze, OneFile, All, Simple, Unused, ChangedBehavior 4 2 Minor 87 %