Skip to content

Add qodana CI checks#9

Merged
mambax7 merged 2 commits intomasterfrom
qodana-automation-1198895180
Mar 24, 2025
Merged

Add qodana CI checks#9
mambax7 merged 2 commits intomasterfrom
qodana-automation-1198895180

Conversation

@qodana-cloud
Copy link
Copy Markdown

@qodana-cloud qodana-cloud bot commented Mar 24, 2025

Adds qodana.yaml and GitHub workflow file that runs Qodana static analysis on each pull request.

@mambax7 mambax7 merged commit d559777 into master Mar 24, 2025
11 of 12 checks passed
@mambax7 mambax7 deleted the qodana-automation-1198895180 branch March 24, 2025 17:03
@github-actions
Copy link
Copy Markdown

Qodana for PHP

96256 new problems were found

Inspection name Severity Problems
Undefined variable 🔴 Failure 375
Element is not available in configured PHP version 🔴 Failure 170
Pass parameter by reference 🔴 Failure 7
Class hierarchy checks 🔴 Failure 2
Inconsistent return points 🔴 Failure 2
Duplicate array keys 🔶 Warning 75234
Undefined class 🔶 Warning 1643
Equality operator may cause type coercion 🔶 Warning 1162
Unused local symbol 🔶 Warning 685
Redundant character escape 🔶 Warning 681
Parameter type 🔶 Warning 562
Undefined method 🔶 Warning 404
Comma expression 🔶 Warning 258
Duplicate declaration 🔶 Warning 194
Inconsistent return points 🔶 Warning 166
Unreachable statement 🔶 Warning 140
Assignment used as condition 🔶 Warning 120
Redundant local variable 🔶 Warning 95
Statement has empty body 🔶 Warning 89
Missing parent call for constructor 🔶 Warning 82
Illegal array key type 🔶 Warning 81
JQuery selector can be optimized 🔶 Warning 80
Duplicate character in character class 🔶 Warning 79
Potentially invalid reference to 'this' from closure 🔶 Warning 68
Unused assignment 🔶 Warning 66
Incompatible return type 🔶 Warning 65
Mismatched JSDoc and function signature 🔶 Warning 59
Syntax errors and unresolved references in JSDoc 🔶 Warning 55
Unnecessary semicolon 🔶 Warning 52
Undefined namespace 🔶 Warning 48
Undefined constant 🔶 Warning 39
Invalid function result used 🔶 Warning 38
Unnecessary non-capturing group 🔶 Warning 38
Single character alternation 🔶 Warning 28
Illegal string offset 🔶 Warning 22
Unnecessary 'return' statement 🔶 Warning 22
Void function return value used 🔶 Warning 21
Primitive type object wrapper used 🔶 Warning 19
Unnecessary label 🔶 Warning 19
Undefined property 🔶 Warning 16
Suspicious back reference 🔶 Warning 16
Unresolved file references 🔶 Warning 14
Expression result unused 🔶 Warning 14
Bitwise operator usage 🔶 Warning 13
Referencing mutable variable from closure 🔶 Warning 13
Potentially invalid constructor usage 🔶 Warning 12
Exception used for local control-flow 🔶 Warning 9
Declaration of overridden method should be compatible with parent class 🔶 Warning 9
Redundant 'if' statement 🔶 Warning 9
Method '__toString' implementation 🔶 Warning 8
'with' statement 🔶 Warning 8
Statement with empty body 🔶 Warning 7
Object is 'null' or 'undefined' 🔶 Warning 6
Suspicious variable/parameter name combination 🔶 Warning 6
Undefined function 🔶 Warning 6
Wrong string concatenation 🔶 Warning 6
Variable is assigned to itself 🔶 Warning 6
Property is immediately rewritten 🔶 Warning 5
Reserved word used as name 🔶 Warning 4
'this' expression which references the global object 🔶 Warning 4
Redundant conditional expression 🔶 Warning 4
Mismatched query and update of collection 🔶 Warning 3
Class path doesn't match project structure 🔶 Warning 3
Unnecessary 'continue' statement 🔶 Warning 3
Infinite loop statement 🔶 Warning 2
Consecutive commas in array literal 🔶 Warning 2
Loop statement that doesn't loop 🔶 Warning 2
Redundant assignment 🔶 Warning 2
Begin or end anchor in unexpected position 🔶 Warning 2
Unreachable code 🔶 Warning 2
Incorrect usage of JSDoc tags 🔶 Warning 1
Foreach array is used as value 🔶 Warning 1
Property usages have same access 🔶 Warning 1
Invalid argument supplied for 'foreach()' 🔶 Warning 1
Pointless arithmetic expression 🔶 Warning 1
Duplicate branch in alternation 🔶 Warning 1
Define constant name can be replaced with 'const' syntax ◽️ Notice 3556
Fully qualified name usage ◽️ Notice 2121
Unnecessary curly braces syntax for variable ◽️ Notice 1019
Unnecessary fully qualified name ◽️ Notice 846
Redundant optional argument ◽️ Notice 551
Undefined variable ◽️ Notice 497
Duplicated code fragment ◽️ Notice 397
Unhandled exception ◽️ Notice 387
Unused local variable ◽️ Notice 341
Missing @throws tag(s) ◽️ Notice 311
Unresolved include ◽️ Notice 284
Deprecated symbol used ◽️ Notice 249
Unused parameter ◽️ Notice 196
Possible polymorphic call ◽️ Notice 194
PHPDoc comment matches function/method signature ◽️ Notice 179
Condition always evaluates to 'true/false' ◽️ Notice 174
Unnecessary local variable ◽️ Notice 172
Regular expression can be simplified ◽️ Notice 154
Return type in PHPDoc comment does not match the actual return type ◽️ Notice 128
Idempotent operation in binary expression ◽️ Notice 111
Implicitly declared global JavaScript variable ◽️ Notice 94
Expression statement which is not assignment or call ◽️ Notice 92
Parameters number mismatch declaration ◽️ Notice 73
Parameter's name changed during inheritance ◽️ Notice 71
Pointless boolean expression inside 'if' condition ◽️ Notice 57
Type tag without variable name ◽️ Notice 56
Type cast is unnecessary ◽️ Notice 54
Unnecessary pass-by-ref ◽️ Notice 47
Deprecated ◽️ Notice 44
'if' with common parts ◽️ Notice 36
Unused import ◽️ Notice 36
Redundant 'continue/break' argument ◽️ Notice 34
Strict comparison of operands with incompatible types ◽️ Notice 31
Duplicate branch in switch statement ◽️ Notice 27
Concatenation to empty string can be merged with assignment ◽️ Notice 26
'array_push()' with single element ◽️ Notice 24
Unused private method ◽️ Notice 23
Ternary expression can be replaced with condition ◽️ Notice 22
Expression is always 'null' ◽️ Notice 19
Redundant @var tag ◽️ Notice 17
Ternary expression can be replaced with short version ◽️ Notice 17
PHPDoc comment signature is not complete ◽️ Notice 16
Condition inside logical expression checked by subsequent condition ◽️ Notice 15
Dynamic property declaration ◽️ Notice 15
Format function call with single argument ◽️ Notice 15
Redundant modifier ◽️ Notice 14
Comparison of expressions having incompatible types ◽️ Notice 12
Array write access is not used ◽️ Notice 12
Deprecated exception handling via doc tags ◽️ Notice 12
Unnecessary 'return/continue' statement ◽️ Notice 12
Missing 'break' statement ◽️ Notice 11
Redundant cast to boolean ◽️ Notice 11
Unnecessary leading '\' in 'use' statement ◽️ Notice 11
Redundant cast to string ◽️ Notice 11
Redundant property initializer ◽️ Notice 10
Array access can be replaced with 'foreach' value ◽️ Notice 9
Array internal pointer reset is unnecessary ◽️ Notice 9
'mixed' type can be replaced with 'array' ◽️ Notice 8
Redundant '\d', '[:digit:]', or '\D' class elements ◽️ Notice 7
Redundant @throws tag(s) ◽️ Notice 6
Loop can be converted to 'array_map()' call ◽️ Notice 6
Method's return value is never used ◽️ Notice 6
Undefined method ◽️ Notice 6
Redundant 'static' in final class ◽️ Notice 6
Loop can be replaced with 'implode()' ◽️ Notice 5
Redundant catch clause ◽️ Notice 5
Result of method call returning a promise is ignored ◽️ Notice 4
'isset' can check nested array access and sub properties directly ◽️ Notice 4
'switch' with single 'case' ◽️ Notice 4
Unnecessary semicolon ◽️ Notice 4
Element in class is already covered ◽️ Notice 3
'preg_split' can be replaced with 'explode' ◽️ Notice 3
Parameter's value is always the same ◽️ Notice 3
'switch' with common parts ◽️ Notice 3
Undefined property assignment ◽️ Notice 2
Loop does not iterate ◽️ Notice 2
Private property can be local ◽️ Notice 2
Undefined property ◽️ Notice 2
Unused private property ◽️ Notice 2
Array is always empty at the point of access ◽️ Notice 1
Array used only with write access ◽️ Notice 1
Condition can be replaced with 'min()'/'max()' call ◽️ Notice 1
Logical expression has same operands ◽️ Notice 1
'in_array' can be replaced with comparison ◽️ Notice 1
Loop can be replaced with 'str_repeat' ◽️ Notice 1
`'preg_replace()' can be replaced with '(l r)trim' call` ◽️ Notice
Redundant method override ◽️ Notice 1
Variable is only used inside closure ◽️ Notice 1

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants