dist/jate/modules/ServerVars/ServerVars.php

Summary

Maintainability
A
0 mins
Test Coverage

__construct accesses the super-global variable $_SERVER.
Open

    public function __construct() {
      $this->server = [];
      $this->server["HTTP_HOST"]   = $_SERVER["HTTP_HOST"];
      $this->server["REQUEST_URI"] = $_SERVER["REQUEST_URI"];
      $this->server["PHP_SELF"]    = $_SERVER["PHP_SELF"];

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

__construct accesses the super-global variable $_SERVER.
Open

    public function __construct() {
      $this->server = [];
      $this->server["HTTP_HOST"]   = $_SERVER["HTTP_HOST"];
      $this->server["REQUEST_URI"] = $_SERVER["REQUEST_URI"];
      $this->server["PHP_SELF"]    = $_SERVER["PHP_SELF"];

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

__construct accesses the super-global variable $_SERVER.
Open

    public function __construct() {
      $this->server = [];
      $this->server["HTTP_HOST"]   = $_SERVER["HTTP_HOST"];
      $this->server["REQUEST_URI"] = $_SERVER["REQUEST_URI"];
      $this->server["PHP_SELF"]    = $_SERVER["PHP_SELF"];

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

__construct accesses the super-global variable $_SERVER.
Open

    public function __construct() {
      $this->server = [];
      $this->server["HTTP_HOST"]   = $_SERVER["HTTP_HOST"];
      $this->server["REQUEST_URI"] = $_SERVER["REQUEST_URI"];
      $this->server["PHP_SELF"]    = $_SERVER["PHP_SELF"];

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