YetiForceCompany/YetiForceCRM

View on GitHub
tests/App/SystemWarnings.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Avoid using static access to class '\App\SystemWarnings' in method 'testSystemWarnings'.
Open

        $warnings = \App\SystemWarnings::getWarnings('all');
Severity: Minor
Found in tests/App/SystemWarnings.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\SystemWarnings' in method 'testSystemWarnings'.
Open

        $folders = \App\SystemWarnings::getFolders();
Severity: Minor
Found in tests/App/SystemWarnings.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\SystemWarnings::assertNotEmpty
Open

        $this->assertNotEmpty($folders);
Severity: Critical
Found in tests/App/SystemWarnings.php by phan

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

        $this->assertNotEmpty($warnings);
Severity: Critical
Found in tests/App/SystemWarnings.php by phan

Argument 1 (folders) is 'all' but \App\SystemWarnings::getWarnings() takes array defined at /code/app/SystemWarnings.php:60
Open

        $warnings = \App\SystemWarnings::getWarnings('all');
Severity: Minor
Found in tests/App/SystemWarnings.php by phan

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

        $warnings = \App\SystemWarnings::getWarnings('all');
Severity: Minor
Found in tests/App/SystemWarnings.php by phpcodesniffer

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

     * Record search test.
Severity: Minor
Found in tests/App/SystemWarnings.php by phpcodesniffer

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

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

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

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

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

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

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

        $this->assertNotEmpty($folders);
Severity: Minor
Found in tests/App/SystemWarnings.php by phpcodesniffer

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

        $folders = \App\SystemWarnings::getFolders();
Severity: Minor
Found in tests/App/SystemWarnings.php by phpcodesniffer

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

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

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

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

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

        $this->assertNotEmpty($warnings);
Severity: Minor
Found in tests/App/SystemWarnings.php by phpcodesniffer

There are no issues that match your filters.

Category
Status