PHP

PHP

Made by DeepSource

Unused constructor parameter PHP-W1037

Anti-pattern
Major

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

Bad Practice

class UnusedParam
{

    public function __construct($unusedParameter)
    {}

}

Recommended:

class UnusedParam
{

    public function __construct()
    {}

}