chippyash/Slim-Symfony-Dic

View on GitHub

Showing 2 of 2 total issues

Missing class import via use statement (line '57', column '23').
Open

            throw new \Exception(self::ERR_NO_DIC);
Severity: Minor
Found in src/Slimdic/Dic/Builder.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

getServerConfig accesses the super-global variable $_SERVER.
Open

    public static function getServerConfig()
    {
        return $_SERVER;
    }
Severity: Minor
Found in src/Slimdic/Dic/Builder.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Severity
Category
Status
Source
Language