chippyash/Slim-Symfony-Dic

View on GitHub
src/Slimdic/Dic/Builder.php

Summary

Maintainability
A
0 mins
Test Coverage

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

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

There are no issues that match your filters.

Category
Status