Showing 591 of 591 total issues
Avoid using static access to class '\DrdPlus\Codes\Armaments\WeaponCategoryCode' in method 'I_can_get_projectile_category_codes'. Open
$projectileCategory = WeaponCategoryCode::getIt($code);
- 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 '\DrdPlus\Codes\Body\OrdinaryWoundOriginCode' in method 'I_can_use_it'. Open
$ordinaryWoundOrigin = OrdinaryWoundOriginCode::getIt();
- 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 '\DrdPlus\Codes\CombatActions\CombatActionCode' in method 'I_can_get_ranged_only_codes'. Open
CombatActionCode::getPossibleValues()
- 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 '\Granam\Tools\ValueDescriber' in method 'checkTranslationsFormat'. Open
'Expected non-empty string, got ' . ValueDescriber::describe($translation)
- 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 'DrdPlus\Codes\Properties\RemarkableSenseCode' in method 'getRemarkableSensePropertyPossibleValues'. Open
return RemarkableSenseCode::getPossibleValues();
- 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 '\DrdPlus\Codes\CombatActions\MeleeCombatActionCode' in method 'I_can_get_melee_only_codes'. Open
self::assertSame($expectedMeleeOnly, MeleeCombatActionCode::getMeleeOnlyCombatActionValues());
- 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 '\DrdPlus\Codes\Body\OrdinaryWoundOriginCode' in method 'I_can_use_it'. Open
$sameOrdinaryWoundOrigin = OrdinaryWoundOriginCode::getIt(OrdinaryWoundOriginCode::ORDINARY);
- 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 '\DrdPlus\Codes\Body\OrdinaryWoundOriginCode' in method 'I_can_not_create_custom_ordinary_origin'. Open
OrdinaryWoundOriginCode::getEnum('Kitchen accident');
- 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
The class SpellCode has 1062 lines of code. Current threshold is 1000. Avoid really long classes. Open
class SpellCode extends TranslatableCode
{
// TIME-SPACE
public const MAGIC_ARMOR = 'magic_armor';
public const PROJECTILE = 'projectile';
- Exclude checks
The method fetchTranslations() has 501 lines of code. Current threshold is set to 100. Avoid really long methods. Open
protected function fetchTranslations(): array
{
return [
'en' => [
// TIME-SPACE
- Exclude checks
Avoid using static access to class '\DrdPlus\Codes\Armaments\WeaponCategoryCode' in method 'I_can_get_melee_weapon_category_codes_at_once'. Open
$meleeCategory = WeaponCategoryCode::getIt($code);
- 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 '\DrdPlus\Codes\Armaments\WeaponCategoryCode' in method 'getRandomWeaponCategoryCode'. Open
$category = WeaponCategoryCode::getIt(
$this->getWeaponCategoryValues()[array_rand($this->getWeaponCategoryValues())]
);
- 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 '\DrdPlus\Codes\GenderCode' in method 'I_can_ask_it_if_is_male_or_female'. Open
$female = GenderCode::getIt(GenderCode::FEMALE);
- 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 '\DrdPlus\Codes\Armaments\RangedWeaponCode' in method 'I_can_not_convert_anything_to_melee_weapon_code'. Open
$rangeWeapon = RangedWeaponCode::getIt(RangedWeaponCode::MINICROSSBOW);
- 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 '\DrdPlus\Codes\Armaments\RangedWeaponCode' in method 'I_can_not_extended_it_by_same_code_but_different_category'. Open
self::assertNotContains('corge', RangedWeaponCode::getPossibleValues());
- 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 '\DrdPlus\Codes\Armaments\MeleeWeaponCode' in method 'I_can_convert_spear_to_melee_weapon_code'. Open
self::assertSame(MeleeWeaponCode::getIt(MeleeWeaponCode::SPEAR), $meleeSpear);
- 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 '\DrdPlus\Codes\Armaments\RangedWeaponCode' in method 'I_can_distinguish_throwing_and_shooting_weapon'. Open
$rangeWeaponCode = RangedWeaponCode::getIt($rangeWeaponCodeValue);
- 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 '\DrdPlus\Codes\Armaments\WeaponCategoryCode' in method 'I_can_get_ranged_weapon_category_codes'. Open
$rangedCategory = WeaponCategoryCode::getIt($code);
- 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 unused parameters such as '$weaponlikeCode'. Open
protected function isSameCodeAllowedFor(string $weaponlikeCode, string $interferingCodeClass): bool
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid using static access to class '\DrdPlus\Codes\Armaments\WeaponCategoryCode' in method 'I_can_get_projectile_category_codes'. Open
WeaponCategoryCode::getProjectileCategoryValues()
- 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();
}
}