jaroslavtyc/drd-plus-health

View on GitHub
tests/Health/Afflictions/SpecificAfflictions/ThirstTest.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '21', column '31').
Open

        $healthProperty = new \ReflectionProperty(Affliction::class, 'health');

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\AfflictionSize' in method 'I_can_use_it'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'It_is_linked_with_health_immediately'.
Open

        $thirst = Thirst::createIt($health = $this->createHealth($afflictions), AfflictionSize::getIt(123));

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\AfflictionSize' in method 'getSut'.
Open

        return Thirst::createIt(new Health(), AfflictionSize::getIt(46));

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\AfflictionSize' in method 'I_can_get_agility_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'I_can_use_it'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'I_can_get_heal_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'I_can_get_malus_to_activities'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'I_can_get_will_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'I_can_get_charisma_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'I_can_get_malus_to_activities'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'I_can_get_knack_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'I_can_get_will_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'I_can_get_charisma_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'getSut'.
Open

        return Thirst::createIt(new Health(), AfflictionSize::getIt(46));

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\Thirst' in method 'I_can_get_strength_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'I_can_get_strength_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'I_can_get_heal_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'I_can_get_intelligence_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'It_is_linked_with_health_immediately'.
Open

        $thirst = Thirst::createIt($health = $this->createHealth($afflictions), AfflictionSize::getIt(123));

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\Thirst' in method 'I_can_get_agility_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\Thirst' in method 'I_can_get_knack_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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\AfflictionSize' in method 'I_can_get_intelligence_malus'.
Open

        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));

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_heal_malus is not named in camelCase.
Open

    public function I_can_get_heal_malus()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(0, $thirst->getHealMalus());
    }

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()
    {
        $afflictions = [];
        $thirst = Thirst::createIt($health = $this->createHealth($afflictions), AfflictionSize::getIt(123));
        self::assertSame($afflictions, [$thirst]);

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()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(-567, $thirst->getStrengthMalus());
    }

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()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(-567, $thirst->getStrengthMalus());
    }

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()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(-567, $thirst->getStrengthMalus());
    }

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()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(-567, $thirst->getStrengthMalus());
    }

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()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(-567, $thirst->getStrengthMalus());
    }

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()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(-567, $thirst->getStrengthMalus());
    }

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_malus_to_activities is not named in camelCase.
Open

    public function I_can_get_malus_to_activities()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertSame(0, $thirst->getMalusToActivities());
    }

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()
    {
        $thirst = Thirst::createIt(new Health(), AfflictionSize::getIt(567));
        self::assertInstanceOf(Thirst::class, $thirst);
    }

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

There are no issues that match your filters.

Category
Status