jaroslavtyc/drd-plus-codes

View on GitHub

Showing 591 of 591 total issues

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()
    {
        if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
            self::assertFalse(false, 'Can not create enum from abstract class');

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

    public function I_can_not_get_sub_race_default_to_an_unknown_race()
    {
        $this->expectException(\DrdPlus\Codes\Exceptions\UnknownRaceCode::class);
        $this->expectExceptionMessageMatches('~rat-at-toullie~');
        $defaultOrcSubRace = SubRaceCode::getDefaultSubRaceFor($this->createRaceCode('rat-at-toullie'));
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_get_warning_for_unknown_locale is not named in camelCase.
Open

    public function I_get_warning_for_unknown_locale()
    {
        /** @var AbstractTheurgistCode $sutClass */
        $sutClass = self::getSutClass();
        foreach ($sutClass::getPossibleValues() as $value) {

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

    public function Even_armament_code_itself_is_code()
    {
        self::assertTrue(is_a(ArmamentCode::class, Code::class, true));
    }

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

    public function It_is_melee_weapon_code()
    {
        /** @var MeleeWeaponCode $sut */
        $sut = $this->getSut();
        self::assertInstanceOf(MeleeWeaponCode::class, $sut);

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

    public function I_can_not_convert_anything_to_melee_weapon_code()
    {
        $this->expectException(\DrdPlus\Codes\Armaments\Exceptions\CanNotBeConvertedToRangeWeaponCode::class);
        $this->expectExceptionMessageMatches('~cudgel~');
        $wantItRange = MeleeWeaponCode::getIt(MeleeWeaponCode::CUDGEL);

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

    abstract public function I_can_easily_find_out_if_is_shield();

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

    abstract public function I_can_find_out_if_is_sling_stone();

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

    public function I_can_ask_it_if_is_helm_or_body_armor()
    {
        $helmCode = HelmCode::getIt(HelmCode::BARREL_HELM);
        self::assertTrue($helmCode->isHelm());
        self::assertFalse($helmCode->isBodyArmor());

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()
    {
        self::assertSame(
            $expectedValues = [
                // throwing weapons

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

    public function I_can_get_mace_and_club_codes()
    {
        self::assertSame(
            [
                'cudgel',

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

    public function I_can_easily_composer_method_to_get_weapons_of_same_category()
    {
        foreach (WeaponCategoryCode::getRangedWeaponCategoryValues() as $rangedWeaponCategoryValue) {
            $getRangedWeaponOfCategory = StringTools::assembleGetterForName($rangedWeaponCategoryValue . 'Values');
            self::assertTrue(method_exists(self::getSutClass(), $getRangedWeaponOfCategory));

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

    public function I_can_easily_find_out_if_is_melee()
    {
        $rangedWeaponCode = RangedWeaponCode::getIt(RangedWeaponCode::getPossibleValues()[0]);
        self::assertFalse($rangedWeaponCode->isMelee());
    }

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

    public function I_can_easily_find_out_if_is_protective_armament()
    {
        $shieldCode = ShieldCode::getIt(ShieldCode::MEDIUM_SHIELD);
        self::assertTrue($shieldCode->isProtectiveArmament());
        self::assertInstanceOf(ProtectiveArmamentCode::class, $shieldCode);

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

    public function I_can_find_out_if_is_arrow()
    {
        self::assertFalse(SlingStoneCode::getIt(SlingStoneCode::SLING_STONE_HEAVIER)->isArrow());
    }

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

    public function I_can_not_use_non_string_for_translation_of_custom_code()
    {
        $this->expectException(\DrdPlus\Codes\Partials\Exceptions\InvalidTranslationFormat::class);
        $this->expectExceptionMessageMatches('~NULL~');
        /** like @see \DrdPlus\Codes\Armaments\MeleeWeaponCode::addNewMeleeWeaponCode */

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(ConditionsAffectingHealingCode::GOOD_CONDITIONS, $sut->getValue(), 'Expected good conditions as a default value');
    }

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

    public function I_can_ask_it_for_type(string $value, bool $isCrush, bool $isStab, bool $isCut)
    {
        $woundTypeCode = PhysicalWoundTypeCode::getIt($value);
        self::assertSame($isCrush, $woundTypeCode->isCrush());
        self::assertSame($isStab, $woundTypeCode->isStab());

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

    public function I_can_get_every_type_of_serious_wound_origin(string $seriousWoundOriginName)
    {
        $getWoundOrigin = StringTools::assembleGetterForName($seriousWoundOriginName) . 'WoundOrigin';
        /** @var SeriousWoundOriginCode $seriousWoundOrigin */
        $seriousWoundOrigin = SeriousWoundOriginCode::$getWoundOrigin();

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

    public function I_can_get_melee_only_codes()
    {
        $expectedMeleeOnly = array_diff(
            array_values((new \ReflectionClass(MeleeCombatActionCode::class))->getConstants()),
            CombatActionCode::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

Severity
Category
Status
Source
Language