Mezzle/queuejitsu-scheduler-cli

View on GitHub

Showing 3 of 4 total issues

Avoid unused parameters such as '$name'.
Open

    public function __invoke(ContainerInterface $container, string $name, callable $callback)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused parameters such as '$output'.
Open

    protected function execute(InputInterface $input, OutputInterface $output): int
Severity: Minor
Found in src/Command/Scheduler.php by phpmd

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

The method writePidFile() contains an exit expression.
Open

            die(sprintf('Could not write PID information to %s', $pidfile));
Severity: Minor
Found in src/Command/Scheduler.php by phpmd

ExitExpression

Since: 0.2

An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

Example

class Foo {
    public function bar($param)  {
        if ($param === 42) {
            exit(23);
        }
    }
}

Source https://phpmd.org/rules/design.html#exitexpression

Severity
Category
Status
Source
Language