jaroslavtyc/drd-plus-codes

View on GitHub

Showing 591 of 591 total issues

Similar blocks of code found in 6 locations. Consider refactoring.
Open

    public static function getMentalSpellCodes(): array
    {
        return [
            self::COLORS_AND_SHAPES,
            self::ENJOY_YOURSELF,
Severity: Major
Found in Codes/Wizard/SpellCode.php and 5 other locations - About 1 day to fix
Codes/Wizard/SpellCode.php on lines 58..102
Codes/Wizard/SpellCode.php on lines 149..193
Codes/Wizard/SpellCode.php on lines 240..284
Codes/Wizard/SpellCode.php on lines 331..375
Codes/Wizard/SpellCode.php on lines 512..556

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 248.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

    public static function getVitalSpellCodes(): array
    {
        return [
            self::QUINT_OF_SENSES,
            self::TORTURE,
Severity: Major
Found in Codes/Wizard/SpellCode.php and 5 other locations - About 1 day to fix
Codes/Wizard/SpellCode.php on lines 58..102
Codes/Wizard/SpellCode.php on lines 149..193
Codes/Wizard/SpellCode.php on lines 240..284
Codes/Wizard/SpellCode.php on lines 331..375
Codes/Wizard/SpellCode.php on lines 421..465

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 248.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

    public static function getMaterialSpellCodes(): array
    {
        return [
            self::NOT_EVEN_HIT,
            self::TODAY_YOU_WILL_TRY_IT_WITHOUT_WEAPON,
Severity: Major
Found in Codes/Wizard/SpellCode.php and 5 other locations - About 1 day to fix
Codes/Wizard/SpellCode.php on lines 58..102
Codes/Wizard/SpellCode.php on lines 149..193
Codes/Wizard/SpellCode.php on lines 331..375
Codes/Wizard/SpellCode.php on lines 421..465
Codes/Wizard/SpellCode.php on lines 512..556

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 248.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            'en' => [
                self::COMMONER => [self::$ONE => 'commoner', self::$FEW => 'commoners', self::$MANY => 'commoners'],
                self::FIGHTER => [self::$ONE => 'fighter', self::$FEW => 'fighters', self::$MANY => 'fighters'],
                self::THIEF => [self::$ONE => 'thief', self::$FEW => 'thieves', self::$MANY => 'thieves'],
                self::RANGER => [self::$ONE => 'ranger', self::$FEW => 'rangers', self::$MANY => 'rangers'],
Severity: Major
Found in Codes/ProfessionCode.php and 1 other location - About 7 hrs to fix
Codes/ProfessionCode.php on lines 40..48

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 237.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            'cs' => [
                self::COMMONER => [self::$ONE => 'obyvatel', self::$FEW => 'obyvatelé', self::$MANY => 'obyvatelů'],
                self::FIGHTER => [self::$ONE => 'bojovník', self::$FEW => 'bojovníci', self::$MANY => 'bojovníků'],
                self::THIEF => [self::$ONE => 'zloděj', self::$FEW => 'zloději', self::$MANY => 'zlodějů'],
                self::RANGER => [self::$ONE => 'hraničář', self::$FEW => 'hraničáři', self::$MANY => 'hraničářů'],
Severity: Major
Found in Codes/ProfessionCode.php and 1 other location - About 7 hrs to fix
Codes/ProfessionCode.php on lines 49..57

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 237.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    protected function fetchTranslations(): array
    {
        return [
            'en' => [
                self::WITHOUT_SHIELD => [self::$ONE => 'without shield'],
Severity: Major
Found in Codes/Armaments/ShieldCode.php and 2 other locations - About 7 hrs to fix
Codes/Environment/MaterialCode.php on lines 35..55
Codes/RaceCode.php on lines 44..64

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 224.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    protected function fetchTranslations(): array
    {
        return [
            'en' => [
                self::CLOTH_OR_PAPER_OR_ROPE => [self::$ONE => 'cloth or paper or rope'],
Severity: Major
Found in Codes/Environment/MaterialCode.php and 2 other locations - About 7 hrs to fix
Codes/Armaments/ShieldCode.php on lines 166..186
Codes/RaceCode.php on lines 44..64

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 224.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    protected function fetchTranslations(): array
    {
        return [
            'cs' => [
                self::HUMAN => [self::$ONE => 'člověk'],
Severity: Major
Found in Codes/RaceCode.php and 2 other locations - About 7 hrs to fix
Codes/Armaments/ShieldCode.php on lines 166..186
Codes/Environment/MaterialCode.php on lines 35..55

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 224.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File MeleeWeaponCodeTest.php has 442 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php declare(strict_types=1);

namespace DrdPlus\Tests\Codes\Armaments;

use DrdPlus\Codes\Armaments\Exceptions\CanNotBeConvertedToRangeWeaponCode;
Severity: Minor
Found in tests/Codes/Armaments/MeleeWeaponCodeTest.php - About 6 hrs to fix

    File MeleeWeaponCode.php has 438 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php declare(strict_types=1);
    
    namespace DrdPlus\Codes\Armaments;
    
    /**
    Severity: Minor
    Found in Codes/Armaments/MeleeWeaponCode.php - About 6 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  'en' => [
                      self::ROUND => [self::$ONE => 'round', self::$FEW => 'rounds', self::$MANY => 'rounds'],
                      self::MINUTE => [self::$ONE => 'minute', self::$FEW => 'minutes', self::$MANY => 'minutes'],
                      self::HOUR => [self::$ONE => 'hour', self::$FEW => 'hours', self::$MANY => 'hours'],
                      self::DAY => [self::$ONE => 'day', self::$FEW => 'days', self::$MANY => 'days'],
      Severity: Major
      Found in Codes/Units/TimeUnitCode.php and 1 other location - About 6 hrs to fix
      Codes/Units/TimeUnitCode.php on lines 49..56

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 204.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  'cs' => [
                      self::ROUND => [self::$ONE => 'kolo', self::$FEW => 'kola', self::$MANY => 'kol'],
                      self::MINUTE => [self::$ONE => 'minuta', self::$FEW => 'minuty', self::$MANY => 'minut'],
                      self::HOUR => [self::$ONE => 'hodina', self::$FEW => 'hodiny', self::$MANY => 'hodin'],
                      self::DAY => [self::$ONE => 'den', self::$FEW => 'dny', self::$MANY => 'dní'],
      Severity: Major
      Found in Codes/Units/TimeUnitCode.php and 1 other location - About 6 hrs to fix
      Codes/Units/TimeUnitCode.php on lines 41..48

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 204.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Method fetchTranslations has 120 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function fetchTranslations(): array
          {
              return [
                  'en' => [
                      self::LIGHT_AXE => [self::$ONE => 'light axe', self::$FEW => 'light axes', self::$MANY => 'light axes'],
      Severity: Major
      Found in Codes/Armaments/MeleeWeaponCode.php - About 4 hrs to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        <?php declare(strict_types=1);
        
        namespace DrdPlus\Tests\Codes\CombatActions;
        
        use DrdPlus\Codes\CombatActions\CombatActionCode;
        Severity: Major
        Found in tests/Codes/CombatActions/RangedCombatActionCodeTest.php and 1 other location - About 4 hrs to fix
        tests/Codes/CombatActions/MeleeCombatActionCodeTest.php on lines 1..40

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 176.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        <?php declare(strict_types=1);
        
        namespace DrdPlus\Tests\Codes\CombatActions;
        
        use DrdPlus\Codes\CombatActions\CombatActionCode;
        Severity: Major
        Found in tests/Codes/CombatActions/MeleeCombatActionCodeTest.php and 1 other location - About 4 hrs to fix
        tests/Codes/CombatActions/RangedCombatActionCodeTest.php on lines 1..40

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 176.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

            public function I_can_not_extended_it_by_same_code_but_different_category()
            {
                $this->expectException(\DrdPlus\Codes\Armaments\Exceptions\RangedWeaponIsAlreadyInDifferentWeaponCategory::class);
                $reflectionClass = new \ReflectionClass(RangedWeaponCode::class);
                $translations = $reflectionClass->getProperty('translations');
        Severity: Major
        Found in tests/Codes/Armaments/RangedWeaponCodeTest.php and 1 other location - About 4 hrs to fix
        tests/Codes/Armaments/MeleeWeaponCodeTest.php on lines 537..553

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 173.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        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');
        Severity: Major
        Found in tests/Codes/Armaments/MeleeWeaponCodeTest.php and 1 other location - About 4 hrs to fix
        tests/Codes/Armaments/RangedWeaponCodeTest.php on lines 304..320

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 173.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Method I_can_ask_code_if_is_specific_weapon_type has 107 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function I_can_ask_code_if_is_specific_weapon_type()
            {
                $questions = [
                    'isAxe', 'isKnifeOrDagger', 'isMaceOrClub', 'isMorningstarOrMorgenstern', 'isSaberOrBowieKnife',
                    'isStaffOrSpear', 'isSword', 'isVoulgeOrTrident', 'isUnarmed',
        Severity: Major
        Found in tests/Codes/Armaments/MeleeWeaponCodeTest.php - About 4 hrs to fix

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              protected function fetchTranslations(): array
              {
                  return [
                      'cs' => [
                          'one' => [
          Severity: Major
          Found in Codes/Theurgist/ModifierCode.php and 1 other location - About 4 hrs to fix
          Codes/Theurgist/DemonCode.php on lines 62..88

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 164.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              protected function fetchTranslations(): array
              {
                  return [
                      'cs' => [
                          'one' => [
          Severity: Major
          Found in Codes/Theurgist/DemonCode.php and 1 other location - About 4 hrs to fix
          Codes/Theurgist/ModifierCode.php on lines 57..83

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 164.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Severity
          Category
          Status
          Source
          Language