codeformunich/Muenchen-Transparent

View on GitHub
protected/commands/ImportStatistikCommand.php

Summary

Maintainability
A
1 hr
Test Coverage

The method ImportStatistikCommand::run() calls the typical debug function var_dump() which is mostly only used during development.
Open

                if (!$dat->save()) var_dump($dat->getErrors());

DevelopmentCodeFragment

Since: 2.3.0

Functions like vardump(), printr() etc. are normally only used during development and therefore such calls in production code are a good indicator that they were just forgotten.

Example

class SuspectCode {

    public function doSomething(array $items)
    {
        foreach ($items as $i => $item) {
            // …

            if ('qafoo' == $item) var_dump($i);

            // …
        }
    }
}

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

Method run has 42 lines of code (exceeds 30 allowed). Consider refactoring.
Open

    public function run($args)
    {
        // Etwas eigene Statistik
        $start_time = microtime(true);
        $rows_imported = 0;
Severity: Minor
Found in protected/commands/ImportStatistikCommand.php - About 1 hr to fix

    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