jaroslavtyc/drd-plus-health

View on GitHub

Showing 669 of 669 total issues

Avoid using static access to class '\DrdPlus\Codes\Body\SeriousWoundOriginCode' in method 'Malus_can_not_decrease_on_fresh_wound'.
Open

                SeriousWoundOriginCode::getElementalWoundOrigin(),
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\SeriousWoundOriginCode' in method 'I_can_be_ordinary_healed'.
Open

            SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\SeriousWoundOriginCode' in method 'I_can_be_seriously_wounded'.
Open

            $seriousWoundOrigin = SeriousWoundOriginCode::getMechanicalStabWoundOrigin(),
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\SeriousWoundOriginCode' in method 'I_can_be_wounded_both_ordinary_and_seriously'.
Open

            SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(),
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\SeriousWoundOriginCode' in method 'I_can_get_intelligence_malus_from_afflictions'.
Open

            SeriousWoundOriginCode::getPsychicalWoundOrigin(),
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\WoundSize' in method 'I_can_get_calculated_filled_half_rows_for_given_wound_value'.
Open

            $gridOfWounds->calculateFilledHalfRowsFor(WoundSize::createIt(7), $this->createWoundBoundary(13))
Severity: Minor
Found in tests/Health/GridOfWoundsTest.php by phpmd

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\ReasonToRollAgainstMalusFromWounds' in method 'I_should_roll_against_malus_from_wounds_because_of_regeneration'.
Open

        self::assertSame(ReasonToRollAgainstMalusFromWounds::getHealReason(), $health->getReasonToRollAgainstMalusFromWounds());
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\SeriousWoundOriginCode' in method 'createSeriousWound'.
Open

            ->andReturn(SeriousWoundOriginCode::getMechanicalCrushWoundOrigin());
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\SeriousWoundOriginCode' in method 'I_can_be_seriously_wounded'.
Open

            $seriousWoundOrigin = SeriousWoundOriginCode::getPsychicalWoundOrigin(),
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\ReasonToRollAgainstMalusFromWounds' in method 'I_can_be_seriously_wounded'.
Open

        self::assertSame(ReasonToRollAgainstMalusFromWounds::getWoundReason(), $health->getReasonToRollAgainstMalusFromWounds());
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\MalusFromWounds' in method 'I_can_not_create_positive_malus'.
Open

        MalusFromWounds::getIt(1);
Severity: Minor
Found in tests/Health/MalusFromWoundsTest.php by phpmd

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 '$seriousWoundOriginCode'.
Open

    protected function createWound(Health $health, WoundSize $woundSize, SeriousWoundOriginCode $seriousWoundOriginCode): Wound
Severity: Minor
Found in tests/Health/OrdinaryWoundTest.php by phpmd

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\Health\TreatmentBoundary' in method 'I_can_not_use_negative_value'.
Open

        TreatmentBoundary::getIt(-1);

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\Inflictions\Glared' in method 'I_can_create_it_from_glare'.
Open

        $glared = Glared::createFromGlare($this->createGlare($malus, $isShined), $health = new Health());

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\Inflictions\Glared' in method 'I_can_lower_malus_by_getting_used_to_darkness'.
Open

        $glared = Glared::createFromGlare($this->createGlare(-36, false), new Health());

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\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_moved_to_reaming_wounds_on_ordinary_heal'.
Open

        $health->addWound($this->createWoundSize(4), SeriousWoundOriginCode::getMechanicalCutWoundOrigin(), $woundBoundary);
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\Inflictions\Glared' in method 'I_can_get_used_to_darkness_by_very_long_waiting_when_blinded'.
Open

        $blinded = Glared::createFromGlare($this->createGlare($malus = -21, false /* not shined = blinded */), new Health());

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\Inflictions\Glared' in method 'I_can_be_glared'.
Open

        self::assertEquals(Glared::createFromGlare($glare, $health), $health->getGlared());
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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\SeriousWoundOriginCode' in method 'I_can_ask_it_if_I_am_suffering_from_wounds'.
Open

            SeriousWoundOriginCode::getIt(SeriousWoundOriginCode::PSYCHICAL),
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

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

            self::assertSame(OrdinaryWoundOriginCode::getIt(), $wound->getWoundOriginCode());
Severity: Minor
Found in tests/Health/WoundTest.php by phpmd

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

Severity
Category
Status
Source
Language