expressly/php-common

View on GitHub
tests/Route/AbstractRouteTest.php

Summary

Maintainability
A
0 mins
Test Coverage

tearDown accesses the super-global variable $_SERVER.
Open

    public function tearDown()
    {
        $this->routeResolver = null;
        unset($_SERVER['PHP_AUTH_USER']);
        unset($_SERVER['PHP_AUTH_PW']);
Severity: Minor
Found in tests/Route/AbstractRouteTest.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

mockSecurity accesses the super-global variable $_SERVER.
Open

    public function mockSecurity()
    {
        $merchant = $this->app['merchant.provider']->getMerchant();
        $merchant->setApiKey('dXNlcm5hbWU6cGFzc3dvcmQ=');
        $this->app['merchant.provider']->setMerchant($merchant);
Severity: Minor
Found in tests/Route/AbstractRouteTest.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

mockSecurity accesses the super-global variable $_SERVER.
Open

    public function mockSecurity()
    {
        $merchant = $this->app['merchant.provider']->getMerchant();
        $merchant->setApiKey('dXNlcm5hbWU6cGFzc3dvcmQ=');
        $this->app['merchant.provider']->setMerchant($merchant);
Severity: Minor
Found in tests/Route/AbstractRouteTest.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

tearDown accesses the super-global variable $_SERVER.
Open

    public function tearDown()
    {
        $this->routeResolver = null;
        unset($_SERVER['PHP_AUTH_USER']);
        unset($_SERVER['PHP_AUTH_PW']);
Severity: Minor
Found in tests/Route/AbstractRouteTest.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

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

abstract class AbstractRouteTest extends \PHPUnit_Framework_TestCase

Expected 1 newline at end of file; 0 found
Open

}

There are no issues that match your filters.

Category
Status