jaroslavtyc/drd-plus-codes

View on GitHub

Showing 591 of 591 total issues

The method Every_code_is_tested is not named in camelCase.
Open

    public function Every_code_is_tested()
    {
        foreach ($this->getCodeClasses() as $codeClass) {
            $expectedTestClass = str_replace('DrdPlus\\Codes', 'DrdPlus\\Tests\\Codes', $codeClass) . 'Test';
            self::assertTrue(
Severity: Minor
Found in tests/Codes/AllCodesTest.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_not_get_opposite_holding_for_two_hands is not named in camelCase.
Open

    public function I_can_not_get_opposite_holding_for_two_hands()
    {
        $this->expectException(\DrdPlus\Codes\Exceptions\ThereIsNoOppositeForTwoHandsHolding::class);
        $this->expectExceptionMessageMatches('~two_hands~');
        ItemHoldingCode::getIt(ItemHoldingCode::TWO_HANDS)->getOpposite();
Severity: Minor
Found in tests/Codes/ItemHoldingCodeTest.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 It_uses_parent_values_as_default_if_not_overloaded is not named in camelCase.
Open

    public function It_uses_parent_values_as_default_if_not_overloaded()
    {
        self::assertSame([], TranslatableExtendableCode::getPossibleValues());
    }

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

    public function I_can_get_native_property_codes()
    {
        self::assertEquals(
            [
                'infravision',

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

    public function I_can_create_code_instance_from_every_constant()
    {
        $sutClass = self::getSutClass();
        /** @noinspection PhpUnhandledExceptionInspection */
        foreach ((new \ReflectionClass($sutClass))->getConstants() as $constant) {
Severity: Minor
Found in tests/Codes/AbstractCodeTest.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_get_whispered_current_code_as_return_value_of_factory_method is not named in camelCase.
Open

    public function I_get_whispered_current_code_as_return_value_of_factory_method()
    {
        foreach ($this->getCodeClasses() as $codeClass) {
            $reflectionClass = new \ReflectionClass($codeClass);
            $classBaseName = preg_replace('~^.*[\\\](\w+)$~', '$1', $codeClass);
Severity: Minor
Found in tests/Codes/AllCodesTest.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 Every_code_has_own_optimized_get_possible_values_method is not named in camelCase.
Open

    public function Every_code_has_own_optimized_get_possible_values_method()
    {
        foreach ($this->getCodeClasses() as $codeClass) {
            $codeClassReflection = new \ReflectionClass($codeClass);
            self::assertTrue($codeClassReflection->hasMethod('getPossibleValues'), "Why $codeClass does not have getPossibleValues() method?");
Severity: Minor
Found in tests/Codes/AllCodesTest.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_restriction_property_codes is not named in camelCase.
Open

    public function I_can_get_restriction_property_codes()
    {
        self::assertEquals(
            [
                'requires_dm_agreement',

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

    public function I_can_get_movements_without_jump()
    {
        $allValues = RidingAnimalMovementCode::getPossibleValues();
        self::assertContains(RidingAnimalMovementCode::JUMPING, $allValues);
        $withoutJumping = array_filter($allValues, function (string $movement) {

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

    public function I_can_not_create_code_from_unknown_value()
    {
        $this->expectException(\DrdPlus\Codes\Partials\Exceptions\UnknownValueForCode::class);
        $this->expectExceptionMessageMatches('~da Vinci~');
        $sutClass = self::getSutClass();
Severity: Minor
Found in tests/Codes/AbstractCodeTest.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_will_get_constant_values_from_reflection_as_fallback is not named in camelCase.
Open

    public function I_will_get_constant_values_from_reflection_as_fallback()
    {
        self::assertSame([], AbstractCode::getPossibleValues());
        $sutClass = static::getSutClass();
        self::assertGreaterThan(0, \count($sutClass::getPossibleValues()));
Severity: Minor
Found in tests/Codes/AbstractCodeTest.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_create_code_instance_from_every_constant is not named in camelCase.
Open

    public function I_can_create_code_instance_from_every_constant()
    {
        /** @var AbstractCode $codeClass */
        foreach ($this->getCodeClasses() as $codeClass) {
            foreach ((new \ReflectionClass($codeClass))->getConstants() as $constant) {
Severity: Minor
Found in tests/Codes/AllCodesTest.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_sub_race_default_to_a_race is not named in camelCase.
Open

    public function I_can_get_sub_race_default_to_a_race()
    {
        $defaultOrcSubRace = SubRaceCode::getDefaultSubRaceFor(RaceCode::getIt(RaceCode::ORC));
        self::assertSame(SubRaceCode::getIt(SubRaceCode::COMMON), $defaultOrcSubRace);
    }
Severity: Minor
Found in tests/Codes/SubRaceCodeTest.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_it_with_default_value is not named in camelCase.
Open

    public function I_can_get_it_with_default_value()
    {
        $sut = $this->findSut();
        self::assertSame($this->getSutDefaultValue(), $sut->getValue(), 'Expected different default value');
    }
Severity: Minor
Found in tests/Codes/AbstractCodeTest.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_ask_it_which_holding_easily is not named in camelCase.
Open

    public function I_can_ask_it_which_holding_easily($holdingValue, $holdsByTwoHands, $holdsByMainHand, $holdsByOffhand)
    {
        $itemHolding = ItemHoldingCode::getIt($holdingValue);
        self::assertSame($itemHolding->holdsByTwoHands(), $holdsByTwoHands);
        self::assertSame($itemHolding->holdsByMainHand(), $holdsByMainHand);
Severity: Minor
Found in tests/Codes/ItemHoldingCodeTest.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_opposite_holding is not named in camelCase.
Open

    public function I_can_get_opposite_holding()
    {
        $mainHand = ItemHoldingCode::getIt(ItemHoldingCode::MAIN_HAND);
        self::assertSame(ItemHoldingCode::MAIN_HAND, $mainHand->getValue());
        $opposite = $mainHand->getOpposite();
Severity: Minor
Found in tests/Codes/ItemHoldingCodeTest.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_not_use_invalid_data_format_of_translations_for_custom_code is not named in camelCase.
Open

    public function I_can_not_use_invalid_data_format_of_translations_for_custom_code()
    {
        $this->expectException(\DrdPlus\Codes\Partials\Exceptions\InvalidTranslationFormat::class);
        $this->expectExceptionMessageMatches('~this should be array~');
        /** like @see \DrdPlus\Codes\Armaments\ArrowCode::addNewArrowCode */

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

    public function I_can_get_all_codes_at_once_or_by_same_named_constant()
    {
        // I can not, because characters ♀ and ♂ can not be part of constant name but we want them in value
        self::assertFalse(false);
    }

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

    public function I_can_ask_it_for_gender_and_get_opposite()
    {
        $lookMars = ProfileCode::getIt(ProfileCode::LOOK_MARS);
        self::assertTrue($lookMars->isMars());
        self::assertFalse($lookMars->isVenus());

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

    public function I_can_use_code_object_as_its_string_value()
    {
        $sutClass = self::getSutClass();
        /** @var string[] $givenValues */
        /** @noinspection PhpUnhandledExceptionInspection */
Severity: Minor
Found in tests/Codes/AbstractCodeTest.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

Severity
Category
Status
Source
Language