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 unused local variables such as '$woundBoundary'.
Open

        $health = $this->createHealthToTest($woundBoundary = $this->createWoundBoundary(5));
Severity: Minor
Found in tests/Health/HealthTest.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

Avoid using static access to class '\DrdPlus\Codes\Body\SeriousWoundOriginCode' in method 'I_can_be_ordinary_wounded'.
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::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 unused local variables such as '$seriousWoundOrigin'.
Open

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

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

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_strength_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\Codes\Body\SeriousWoundOriginCode' in method 'I_can_get_charisma_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\Codes\Body\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_lowered_by_healed_serious_wound'.
Open

        $seriousWound = $health->addWound($this->createWoundSize(7), 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\Codes\Body\SeriousWoundOriginCode' in method 'I_get_treatment_boundary_lowered_by_regenerated_amount'.
Open

        $health->addWound($this->createWoundSize(3), SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(), $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\Codes\Body\SeriousWoundOriginCode' in method 'Malus_is_not_increased_on_new_heal_by_worse_roll'.
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_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_easily_find_out_if_may_have_malus_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\SeriousWoundOriginCode' in method 'I_can_not_regenerate_if_roll_on_malus_expected'.
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_not_heal_serious_wound_not_created_by_current_health'.
Open

        $seriousWound = new SeriousWound($health, $this->createWoundSize(5), SeriousWoundOriginCode::getMechanicalCutWoundOrigin());
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_will_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(5)),
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\Codes\Body\SeriousWoundOriginCode' in method 'I_do_not_have_lowered_treatment_boundary_by_healed_ordinary_wound'.
Open

        $health->addWound($this->createWoundSize(3), SeriousWoundOriginCode::getMechanicalCrushWoundOrigin(), $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\Codes\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_new_wound'.
Open

        $health->addWound($this->createWoundSize(10), SeriousWoundOriginCode::getElementalWoundOrigin(), $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\Codes\Body\SeriousWoundOriginCode' in method 'I_should_roll_against_malus_from_wounds_because_of_heal_of_ordinary_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

Severity
Category
Status
Source
Language