Root/Map.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '78', column '20').
Open

        return new \ArrayIterator($this->items);
Severity: Minor
Found in Root/Map.php by phpmd

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 unused local variables such as '$item'.
Open

        foreach ($this->items as $key => $item) {
Severity: Minor
Found in Root/Map.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

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

TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
Open

        return NULL;
Severity: Minor
Found in Root/Map.php by phpcodesniffer

TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
Open

            if ($key === $name) return TRUE;
Severity: Minor
Found in Root/Map.php by phpcodesniffer

TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
Open

        return FALSE;
Severity: Minor
Found in Root/Map.php by phpcodesniffer

Inline control structures are not allowed
Open

        foreach ($map as $key => $item) $this->add($key, $item);
Severity: Minor
Found in Root/Map.php by phpcodesniffer

Inline control structures are not allowed
Open

            if ($key === $name) return $item;
Severity: Minor
Found in Root/Map.php by phpcodesniffer

Inline control structures are not allowed
Open

            if ($key === $name) return TRUE;
Severity: Minor
Found in Root/Map.php by phpcodesniffer

There are no issues that match your filters.

Category
Status