climbx/Dotenv

View on GitHub
src/Loader/Loader.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

load accesses the super-global variable $_SERVER.
Open

    public function load(array $data): void
    {
        foreach ($data as $key => $value) {
            if (!array_key_exists($key, $_ENV)) {
                $this->writeInEnv($key, $value);
Severity: Minor
Found in src/Loader/Loader.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

writeInServer accesses the super-global variable $_SERVER.
Open

    private function writeInServer(string $key, string $value): void
    {
        $_SERVER[$key] = $value;
    }
Severity: Minor
Found in src/Loader/Loader.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

writeInEnv accesses the super-global variable $_ENV.
Open

    private function writeInEnv(string $key, string $value): void
    {
        $_ENV[$key] = $value;
    }
Severity: Minor
Found in src/Loader/Loader.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

load accesses the super-global variable $_ENV.
Open

    public function load(array $data): void
    {
        foreach ($data as $key => $value) {
            if (!array_key_exists($key, $_ENV)) {
                $this->writeInEnv($key, $value);
Severity: Minor
Found in src/Loader/Loader.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

There are no issues that match your filters.

Category
Status