YetiForceCompany/YetiForceCRM

View on GitHub
tests/App/Config.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using static access to class '\App\Config' in method 'testSetJsEnv'.
Open

        $this->assertNull(\App\Config::setJsEnv('UnitTestsTestVar', 'Test'));
Severity: Minor
Found in tests/App/Config.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Avoid using static access to class '\App\Config' in method 'testGetJsEnv'.
Open

        $this->assertNotEmpty(\App\Config::getJsEnv(), 'Json string expected');
Severity: Minor
Found in tests/App/Config.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

Source https://phpmd.org/rules/cleancode.html#staticaccess

Call to undeclared method \Tests\App\Config::assertNotEmpty
Open

        $this->assertNotEmpty(\App\Config::getJsEnv(), 'Json string expected');
Severity: Critical
Found in tests/App/Config.php by phan

Call to undeclared method \Tests\App\Config::assertNull
Open

        $this->assertNull(\App\Config::setJsEnv('UnitTestsTestVar', 'Test'));
Severity: Critical
Found in tests/App/Config.php by phan

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->assertNotEmpty(\App\Config::getJsEnv(), 'Json string expected');
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Testing JS env vars getter.
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    /**
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     * Testing JS env var setter.
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

        $this->assertNull(\App\Config::setJsEnv('UnitTestsTestVar', 'Test'));
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    }
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function testGetJsEnv()
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    {
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

    public function testSetJsEnv()
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

Spaces must be used to indent lines; tabs are not allowed
Open

     */
Severity: Minor
Found in tests/App/Config.php by phpcodesniffer

There are no issues that match your filters.

Category
Status