jaroslavtyc/drd-plus-tables

View on GitHub
tests/Tables/Armaments/Shields/ShieldsTableTest.php

Summary

Maintainability
A
3 hrs
Test Coverage

Method provideArmamentAndNameWithValue has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function provideArmamentAndNameWithValue(): array
    {
        return [
            [ShieldCode::WITHOUT_SHIELD, ShieldsTable::REQUIRED_STRENGTH, false],
            [ShieldCode::WITHOUT_SHIELD, ShieldsTable::LENGTH, 0],
Severity: Major
Found in tests/Tables/Armaments/Shields/ShieldsTableTest.php - About 2 hrs to fix

    Method I_get_same_values_without_shield_as_without_weapon has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function I_get_same_values_without_shield_as_without_weapon()
        {
            $shieldsTable = new ShieldsTable();
            $unarmedTable = new UnarmedTable();
            self::assertFalse($shieldsTable->getRequiredStrengthOf(ShieldCode::WITHOUT_SHIELD));
    Severity: Minor
    Found in tests/Tables/Armaments/Shields/ShieldsTableTest.php - About 1 hr to fix

      The method I_get_same_values_without_shield_as_without_weapon is not named in camelCase.
      Open

          public function I_get_same_values_without_shield_as_without_weapon()
          {
              $shieldsTable = new ShieldsTable();
              $unarmedTable = new UnarmedTable();
              self::assertFalse($shieldsTable->getRequiredStrengthOf(ShieldCode::WITHOUT_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_not_get_value_of_unknown_shield is not named in camelCase.
      Open

          public function I_can_not_get_value_of_unknown_shield($valueName)
          {
              $this->expectException(\DrdPlus\Tables\Armaments\Exceptions\UnknownShield::class);
              $this->expectExceptionMessageMatches('~protector_of_masses~');
              $getValueNameOf = $this->assembleValueGetter($valueName);

      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