tests/RouterTest.php
Method testRegexMatch
has 135 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testRegexMatch()
{
$app = App::getInstance();
$app->init('dev');
Method testGetAccessRole
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testGetAccessRole()
{
$app = App::getInstance();
$app->init('dev');
File RouterTest.php
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace CodeJetter\tests;
use CodeJetter\core\App;
The method testGetAccessRole() has 142 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
public function testGetAccessRole()
{
$app = App::getInstance();
$app->init('dev');
- Exclude checks
The method testRegexMatch() has 142 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
public function testRegexMatch()
{
$app = App::getInstance();
$app->init('dev');
- Exclude checks
Avoid using static access to class '\CodeJetter\core\App' in method 'testGetAccessRole'. Open
Open
$app = App::getInstance();
- 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 '\CodeJetter\core\App' in method 'testRegexMatch'. Open
Open
$app = App::getInstance();
- 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
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 12 and the first side effect is on line 10. Open
Open
<?php
- Exclude checks