jkphl/micrometa

View on GitHub
src/Micrometa/Infrastructure/Factory/ProfiledNamesFactory.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Missing class import via use statement (line '111', column '38').
Open

        $profiledName          = new \stdClass();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid using Jkphl\Micrometa\Infrastructure\Factory\count() function in while loops.
Open

        while (count($args)) {
            $profiledNames[] = self::consumeProfiledName($args, $profile);
        }

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