codeformunich/Muenchen-Transparent

View on GitHub
protected/commands/Reindex_ReferentInnenCommand.php

Summary

Maintainability
A
0 mins
Test Coverage

The method run() contains an exit expression.
Open

        if (posix_getuid() === 0) die("This command cannot be run as root");

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

Avoid unused parameters such as '$args'.
Open

    public function run($args)

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

There are no issues that match your filters.

Category
Status