Avoid using static access to class '\App\Privilege' in method 'testIsPermitted'. Open
$this->assertTrue(\App\Privilege::isPermitted('Accounts', 'DetailView', \Tests\Base\C_RecordActions::createAccountRecord()->getId()));
- 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\UserPrivilegesFile' in method 'testRecalculateSharingRules'. Open
\App\UserPrivilegesFile::recalculateAll();
- 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\Module' in method 'testCreateModuleMetaFile'. Open
\App\Module::createModuleMetaFile();
- 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\Base\H_Permissions::assertTrue
Open
$this->assertTrue(\App\Privilege::isPermitted('Accounts', 'DetailView', \Tests\Base\C_RecordActions::createAccountRecord()->getId()));
- Exclude checks
Call to undeclared method \Tests\Base\H_Permissions::assertTrue
Open
$this->assertTrue(true);
- Exclude checks
Call to undeclared method \Tests\Base\H_Permissions::assertTrue
Open
$this->assertTrue(true);
- Exclude checks
The class H_Permissions is not named in CamelCase. Open
class H_Permissions extends \Tests\Base
{
/**
* Testing record permissions.
*/
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Line exceeds 120 characters; contains 142 characters Open
$this->assertTrue(\App\Privilege::isPermitted('Accounts', 'DetailView', \Tests\Base\C_RecordActions::createAccountRecord()->getId()));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing record permissions.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testCreateModuleMetaFile()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing refreshing module meta files.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Testing refreshing permission files.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Module::createModuleMetaFile();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testRecalculateSharingRules()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\UserPrivilegesFile::recalculateAll();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testIsPermitted()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue(\App\Privilege::isPermitted('Accounts', 'DetailView', \Tests\Base\C_RecordActions::createAccountRecord()->getId()));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Class name "H_Permissions" is not in camel caps format Open
class H_Permissions extends \Tests\Base
- Exclude checks