jaroslavtyc/drd-plus-stamina

View on GitHub
tests/Stamina/GridOfFatigueTest.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid excessively long variable names like $gridOfFatigueWithoutFatigueAtAll. Keep variable name length under 20.
Open

        $gridOfFatigueWithoutFatigueAtAll = new GridOfFatigue($this->createStamina(0 /* no fatigue */));
Severity: Minor
Found in tests/Stamina/GridOfFatigueTest.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

The method I_can_get_calculated_filled_half_rows_for_given_fatigue_value is not named in camelCase.
Open

    public function I_can_get_calculated_filled_half_rows_for_given_fatigue_value(): void
    {
        // limit of fatigues divisible by two (odd)
        $fatigueBoundary = $this->createFatigueBoundary(124);

Severity: Minor
Found in tests/Stamina/GridOfFatigueTest.php by phpmd

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

    public function I_can_get_maximum_of_fatigues_per_row(): void
    {
        $fatigueBoundary = $this->createFatigueBoundary(123);
        $gridOfFatigueWithoutFatigueAtAll = new GridOfFatigue($this->createStamina(0 /* no fatigue */));
        self::assertSame(123, $gridOfFatigueWithoutFatigueAtAll->getFatiguePerRowMaximum($fatigueBoundary));
Severity: Minor
Found in tests/Stamina/GridOfFatigueTest.php by phpmd

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

    public function I_can_get_number_of_filled_rows(): void
    {
        $fatigueBoundary = $this->createFatigueBoundary(23);

        $gridOfFatigue = new GridOfFatigue($this->createStamina(4));
Severity: Minor
Found in tests/Stamina/GridOfFatigueTest.php by phpmd

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