codeformunich/Muenchen-Transparent

View on GitHub
protected/commands/Reindex_Antrag_PersonenCommand.php

Summary

Maintainability
A
0 mins
Test Coverage

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

Avoid using count() function in for loops.
Open

        for ($i = 0; $i < count($antraege); $i++) {
            echo $i . " / " . count($antraege) . ": " . $antraege[$i]->id . "\n";
            $antraege[$i]->resetPersonen();
        }

CountInLoopExpression

Since: 2.7.0

Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.

Example

class Foo {

  public function bar()
  {
    $array = array();

    for ($i = 0; count($array); $i++) {
      // ...
    }
  }
}

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

There are no issues that match your filters.

Category
Status