PHP

PHP

By DeepSource

Unused constructor parameter PHP-W1037
Anti-pattern

The constructor signature contains one or more unused parameters. Since these are nowhere used in the class, it can be safely removed.

Bad argument passed to isset PHP-W1040
Anti-pattern

isset is either used with an undefined variable or a variable that is known to be defined and non-null.

Empty block of code found PHP-W1085
Anti-pattern
Autofix

An empty block is considered as dead code as it doesn't do anything. The issue is raised when loops, conditionals, or other statements contains empty body which implies some piece of code is missing.

It is advised to remove the empty block since keeping them in the codebase wastes computation time and memory.

Unused variable in the closure use PHP-W1039
Anti-pattern

One or more variables mentioned in the closure's use clause are unused. It is recommended to remove them from the use clause.