tests/App/SystemWarnings.php
Avoid using static access to class '\App\SystemWarnings' in method 'testSystemWarnings'. Open
Open
$warnings = \App\SystemWarnings::getWarnings('all');
- Read upRead up
- Exclude checks
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
Open
$folders = \App\SystemWarnings::getFolders();
- Read upRead up
- Exclude checks
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
Open
$this->assertNotEmpty($folders);
- Exclude checks
Call to undeclared method \Tests\App\SystemWarnings::assertNotEmpty
Open
Open
$this->assertNotEmpty($warnings);
- Exclude checks
Argument 1 (folders)
is 'all'
but \App\SystemWarnings::getWarnings()
takes array
defined at /code/app/SystemWarnings.php:60
Open
Open
$warnings = \App\SystemWarnings::getWarnings('all');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$warnings = \App\SystemWarnings::getWarnings('all');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Record search test.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function testSystemWarnings()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->assertNotEmpty($folders);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$folders = \App\SystemWarnings::getFolders();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->assertNotEmpty($warnings);
- Exclude checks