jannisfink/yarf

View on GitHub

Showing 27 of 27 total issues

__construct accesses the super-global variable $_GET.
Open

  public function __construct($get = null, $post = null, $body = null, $files = null) {
    if ($get === null) {
      $get = $_GET;
    }
    if ($post === null) {
Severity: Minor
Found in src/request/Request.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

get accesses the super-global variable $_SERVER.
Open

  public static function get($key) {
    $array = $_SERVER;
    if (static::$default !== null) {
      $array = static::$default;
    }
Severity: Minor
Found in src/wrapper/Server.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

__construct accesses the super-global variable $_FILES.
Open

  public function __construct($get = null, $post = null, $body = null, $files = null) {
    if ($get === null) {
      $get = $_GET;
    }
    if ($post === null) {
Severity: Minor
Found in src/request/Request.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

TODO found
Open

   * TODO use RoutingException instead of HttpInternalServerError?
Severity: Minor
Found in src/request/PageMapper.php by fixme

FIXME found
Open

      // FIXME this is ugly
Severity: Minor
Found in src/response/PageResolver.php by fixme

FIXME found
Open

      // FIXME use content type given in request?
Severity: Minor
Found in src/response/PageResolver.php by fixme

FIXME found
Open

      // FIXME ensure that a response is always given initialized with at least the content type header
Severity: Minor
Found in src/response/PageResolver.php by fixme
Severity
Category
Status
Source
Language