Missing class import via use statement (line '55', column '32'). Open
self::assertEquals(new \DateInterval('P1D'), $hunger->getOutbreakPeriod());
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class '\DrdPlus\Health\Afflictions\AfflictionName' in method 'I_can_use_it'. Open
self::assertEquals(AfflictionName::getIt('hunger'), $hunger->getName());
- 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\Health\Afflictions\AfflictionDomain' in method 'I_can_use_it'. Open
self::assertSame(AfflictionDomain::getPhysicalDomain(), $hunger->getDomain());
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_intelligence_malus'. Open
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(65178));
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'getSut'. Open
return Hunger::createIt(new Health(), $this->createAfflictionSize(4));
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'It_is_linked_with_health_immediately'. Open
$hunger = Hunger::createIt($health, $this->createAfflictionSize());
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_will_malus'. Open
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(123541));
- 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\Health\Afflictions\AfflictionVirulence' in method 'I_can_use_it'. Open
self::assertSame(AfflictionVirulence::getDayVirulence(), $hunger->getVirulence());
- 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\Health\Afflictions\ElementalPertinence\EarthPertinence' in method 'I_can_use_it'. Open
self::assertSame(EarthPertinence::getMinus(), $hunger->getElementalPertinence());
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_strength_malus'. Open
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(3));
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_charisma_malus'. Open
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(782));
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_use_it'. Open
$anotherHunger = Hunger::createIt($health, $this->createAfflictionSize());
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_knack_malus'. Open
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(21));
- 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\Health\Afflictions\Effects\HungerEffect' in method 'I_can_use_it'. Open
self::assertSame(HungerEffect::getIt(), $hunger->getAfflictionEffect());
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_heal_malus'. Open
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(546));
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_malus_to_activities'. Open
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(987));
- 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\Health\Afflictions\AfflictionSource' in method 'I_can_use_it'. Open
self::assertSame(AfflictionSource::getPassiveSource(), $hunger->getSource());
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_use_it'. Open
$hunger = Hunger::createIt($health, $this->createAfflictionSize(7));
- 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\Health\Afflictions\AfflictionProperty' in method 'I_can_use_it'. Open
self::assertSame(AfflictionProperty::getIt(AfflictionProperty::ENDURANCE), $hunger->getProperty());
- 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\Health\Afflictions\SpecificAfflictions\Hunger' in method 'I_can_get_agility_malus'. Open
$hunger = Hunger::createIt($health, $this->createAfflictionSize(6));
- 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 method I_can_get_malus_to_activities is not named in camelCase. Open
public function I_can_get_malus_to_activities()
{
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(987));
self::assertSame(0, $hunger->getMalusToActivities());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_get_charisma_malus is not named in camelCase. Open
public function I_can_get_charisma_malus()
{
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(782));
self::assertSame(0, $hunger->getKnackMalus());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_get_intelligence_malus is not named in camelCase. Open
public function I_can_get_intelligence_malus()
{
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(65178));
self::assertSame(0, $hunger->getKnackMalus());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_get_strength_malus is not named in camelCase. Open
public function I_can_get_strength_malus()
{
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(3));
self::assertInstanceOf(Hunger::class, $hunger);
self::assertSame(-2, $hunger->getStrengthMalus());
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_get_agility_malus is not named in camelCase. Open
public function I_can_get_agility_malus()
{
$health = new Health();
$hunger = Hunger::createIt($health, $this->createAfflictionSize(6));
self::assertSame(-3, $hunger->getAgilityMalus());
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_get_will_malus is not named in camelCase. Open
public function I_can_get_will_malus()
{
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(123541));
self::assertSame(0, $hunger->getKnackMalus());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_get_knack_malus is not named in camelCase. Open
public function I_can_get_knack_malus()
{
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(21));
self::assertSame(-11, $hunger->getKnackMalus());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method It_is_linked_with_health_immediately is not named in camelCase. Open
public function It_is_linked_with_health_immediately()
{
$health = new Health();
$hunger = Hunger::createIt($health, $this->createAfflictionSize());
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_use_it is not named in camelCase. Open
public function I_can_use_it()
{
$health = new Health();
$hunger = Hunger::createIt($health, $this->createAfflictionSize(7));
self::assertInstanceOf(Hunger::class, $hunger);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method I_can_get_heal_malus is not named in camelCase. Open
public function I_can_get_heal_malus()
{
$hunger = Hunger::createIt(new Health(), $this->createAfflictionSize(546));
self::assertSame(0, $hunger->getHealMalus());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}