tests/App/Utils.php
Avoid using static access to class '\App\Utils\Completions' in method 'testCompletions'. Open
Open
$this->assertSame('<img src="file.php?module=Documents&action=DownloadFile&record=448&fileid=19&show=true" />', \App\Utils\Completions::decodeCustomTag('<yetiforce type="Documents" crm-id="448" attachment-id="19"></yetiforce>'));
- 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\Benchmarks' in method 'testBenchmarks'. Open
Open
$benchmarks = \App\Utils\Benchmarks::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
Call to undeclared method \Tests\App\Utils::assertSame
Open
Open
$this->assertSame('<img src="file.php?module=Documents&action=DownloadFile&record=448&fileid=19&show=true" />', \App\Utils\Completions::decodeCustomTag('<yetiforce type="Documents" crm-id="448" attachment-id="19"></yetiforce>'));
- Exclude checks
Call to method decodeCustomTag
from undeclared class \App\Utils\Completions
Open
Open
$this->assertSame('<img src="file.php?module=Documents&action=DownloadFile&record=448&fileid=19&show=true" />', \App\Utils\Completions::decodeCustomTag('<yetiforce type="Documents" crm-id="448" attachment-id="19"></yetiforce>'));
- Exclude checks
Call to undeclared method \Tests\App\Utils::assertArrayHasKey
Open
Open
$this->assertArrayHasKey('db', $benchmarks);
- Exclude checks
Call to undeclared method \Tests\App\Utils::assertArrayHasKey
Open
Open
$this->assertArrayHasKey('hardDrive', $benchmarks);
- Exclude checks
Call to undeclared method \Tests\App\Utils::assertArrayHasKey
Open
Open
$this->assertArrayHasKey('cpu', $benchmarks);
- Exclude checks
Call to undeclared method \Tests\App\Utils::assertArrayHasKey
Open
Open
$this->assertArrayHasKey('ram', $benchmarks);
- 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
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$benchmarks = \App\Utils\Benchmarks::all();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function testCompletions(): 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
* Tests `\App\Utils\Completions` methods.
- 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
* @return 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
$this->assertSame('<img src="file.php?module=Documents&action=DownloadFile&record=448&fileid=19&show=true" />', \App\Utils\Completions::decodeCustomTag('<yetiforce type="Documents" crm-id="448" attachment-id="19"></yetiforce>'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Tests `\App\Utils\Benchmarks` methods.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @see \App\Utils\Benchmarks
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @see \App\Utils\Completions
- 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 testBenchmarks(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Line exceeds 120 characters; contains 237 characters Open
Open
$this->assertSame('<img src="file.php?module=Documents&action=DownloadFile&record=448&fileid=19&show=true" />', \App\Utils\Completions::decodeCustomTag('<yetiforce type="Documents" crm-id="448" attachment-id="19"></yetiforce>'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->assertArrayHasKey('hardDrive', $benchmarks);
- 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->assertArrayHasKey('ram', $benchmarks);
- 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->assertArrayHasKey('cpu', $benchmarks);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->assertArrayHasKey('db', $benchmarks);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks