tests/Settings/ConfReport.php
Avoid using static access to class '\App\Utils\ConfReport' in method 'setUpBeforeClass'. Open
Open
self::$confReportAll = \App\Utils\ConfReport::getAll();
- 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\Utils\ConfReport' in method 'testSystemInfo'. Open
Open
$this->assertNotEmpty(\App\Utils\ConfReport::getConfig(), 'System information report should be not empty');
- 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\Settings\ConfReport::assertNotEmpty
Open
Open
$this->assertNotEmpty(\App\Utils\ConfReport::getConfig(), 'System information report should be not empty');
- Exclude checks
Call to method getAll
from undeclared class \App\Utils\ConfReport
(Did you mean class \Tests\Settings\ConfReport) Open
Open
self::$confReportAll = \App\Utils\ConfReport::getAll();
- Exclude checks
Call to undeclared method \Tests\Settings\ConfReport::assertIsArray
Open
Open
$this->assertIsArray(
- Exclude checks
Call to method getConfig
from undeclared class \App\Utils\ConfReport
(Did you mean class \Tests\Settings\ConfReport) Open
Open
$this->assertNotEmpty(\App\Utils\ConfReport::getConfig(), 'System information report should be not empty');
- Exclude checks
Call to undeclared method \Tests\Settings\ConfReport::assertIsArray
Open
Open
$this->assertIsArray(
- Exclude checks
Call to undeclared method \Tests\Settings\ConfReport::assertNotEmpty
Open
Open
$this->assertNotEmpty(\App\Db::getInstance()->getInfo(), 'Database configuration report should be not empty');
- Exclude checks
Call to undeclared method \Tests\Settings\ConfReport::assertIsArray
Open
Open
$this->assertIsArray(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static $confReportAll;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Testing database configuration report.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'Database configuration report should be array even if empty'
- 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
* @var array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @codeCoverageIgnore
- 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
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function testSystemInfo()
- 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->assertIsArray(
- 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
* Testing system stability configuration report.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->assertIsArray(
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* All configuration values.
- 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
self::$confReportAll['stability'] ?? null,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'Security configuration (normal mode, show all) report should be not empty'
- 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(\App\Db::getInstance()->getInfo(), 'Database configuration report should be not empty');
- 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
* Testing security configuration report.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->assertNotEmpty(\App\Utils\ConfReport::getConfig(), 'System information report should be not empty');
- 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
* Testing system informations report.
- 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->assertIsArray(
- 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 testSecurityConf()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'Security configuration (normal mode, show all) report should be not empty'
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function testDbConf()
- 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
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Setting of tests.
- 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
}
- 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 testStabilityConf()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function setUpBeforeClass(): void
- 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
self::$confReportAll = \App\Utils\ConfReport::getAll();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
self::$confReportAll['security'] ?? null,
- 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
\App\Db::getInstance()->getInfo(),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks