jaroslavtyc/drd-plus-codes

View on GitHub

Showing 591 of 591 total issues

The method I_can_not_use_invalid_language_code_format_for_custom_code is not named in camelCase.
Open

    public function I_can_not_use_invalid_language_code_format_for_custom_code()
    {
        $this->expectException(\DrdPlus\Codes\Partials\Exceptions\InvalidLanguageCode::class);
        $this->expectExceptionMessageMatches('~a1~');
        /** @var TranslatableExtendableCode $sutClass */

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

    public function I_can_get_its_english_translation()
    {
        foreach ($this->getTranslatableCodeClasses() as $codeClass) {
            $testClass = $this->getTestClass($codeClass);
            self::assertTrue(

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::assertEquals(
            ['physical', 'psychical', 'combined'],
            SkillTypeCode::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_saber_and_bowie_knife_codes is not named in camelCase.
Open

    public function I_can_get_saber_and_bowie_knife_codes()
    {
        self::assertSame(
            [
                'machete',

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

    public function I_can_not_add_new_melee_weapon_code_with_not_melee_category()
    {
        $this->expectException(\DrdPlus\Codes\Armaments\Exceptions\InvalidWeaponCategoryForNewMeleeWeaponCode::class);
        $this->expectExceptionMessageMatches('~throwing~');
        $throwingCategory = WeaponCategoryCode::getIt(WeaponCategoryCode::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_it_with_default_value is not named in camelCase.
Open

    public function I_can_get_it_with_default_value()
    {
        $sut = $this->findSut();
        self::assertSame(MeleeWeaponCode::HAND, $sut->getValue(), 'Expected bare hands 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_find_out_if_is_sling_stone is not named in camelCase.
Open

    public function I_can_find_out_if_is_sling_stone()
    {
        self::assertFalse(ArrowCode::getIt(ArrowCode::LONG_RANGE_ARROW)->isSlingStone());
    }

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(string $codeClass)
    {
        $this->expectException(\DrdPlus\Codes\Partials\Exceptions\UnknownValueForCode::class);
        $this->expectExceptionMessageMatches('~da Vinci~');
        /** @var AbstractCode $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 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(BodyArmorCode::WITHOUT_ARMOR, $sut->getValue(), 'Expected without armor 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_get_sword_codes is not named in camelCase.
Open

    public function I_can_get_sword_codes()
    {
        self::assertSame(
            [
                'short_sword',

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

    public function I_can_not_extended_it_by_same_code_but_different_category()
    {
        $this->expectException(\DrdPlus\Codes\Armaments\Exceptions\MeleeWeaponIsAlreadyInDifferentWeaponCategory::class);
        $reflectionClass = new \ReflectionClass(MeleeWeaponCode::class);
        $translations = $reflectionClass->getProperty('translations');

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::assertTrue(ArrowCode::getIt(ArrowCode::CRIPPLING_ARROW)->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_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(HelmCode::WITHOUT_HELM, $sut->getValue(), 'Expected without helm 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 It_is_projectile is not named in camelCase.
Open

    public function It_is_projectile()
    {
        $sutClass = self::getSutClass();
        $constants = (new \ReflectionClass($sutClass))->getConstants();
        $value = reset($constants);

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::getMeleeWeaponCategoryValues() as $meleeWeaponCategoryValue) {
            $getMeleeWeaponOfCategory = StringTools::assembleGetterForName($meleeWeaponCategoryValue . 'Values');
            self::assertTrue(method_exists(self::getSutClass(), $getMeleeWeaponOfCategory));

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

    public function It_is_not_range_nor_shooting_nor_throwing_weapon_nor_projectile_code()
    {
        $sut = $this->getSut();
        self::assertFalse($sut->isRanged());
        self::assertFalse($sut->isShootingWeapon());

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

    public function I_can_get_morningstar_and_morgenstern_codes()
    {
        self::assertSame(
            [
                'light_morgenstern',

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

    public function I_can_get_throwing_weapon_codes()
    {
        self::assertSame(
            [
                'sand',

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

    public function I_can_easily_find_out_if_is_melee_weapon()
    {
        self::assertTrue(MeleeWeaponCode::getIt(MeleeWeaponCode::CLUB)->isMeleeWeapon());
    }

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