dolejska-daniel/riot-api-datadragon

View on GitHub

Showing 32 of 32 total issues

DataDragonAPI has 84 functions (exceeds 20 allowed). Consider refactoring.
Open

class DataDragonAPI
{
    /**
     *   Settings constants.
     */
Severity: Major
Found in src/DataDragonAPI/DataDragonAPI.php - About 1 day to fix

    File DataDragonAPI.php has 688 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /**
     * Copyright (C) 2016-2023  Daniel Dolejška
     *
    Severity: Major
    Found in src/DataDragonAPI/DataDragonAPI.php - About 1 day to fix

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

          public static function getChampionSplash( string $champion_name, int $skin = 0, array $attributes = [] ): Html
          {
              $attrs = array_merge([ 'alt' => $champion_name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
              $attrs['class'] = implode(' ', [
                  self::getSetting(self::SET_DEFAULT_CLASS),
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 1 other location - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 667..679

      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 178.

      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 static function getChampionLoading( string $champion_name, int $skin = 0, array $attributes = [] ): Html
          {
              $attrs = array_merge([ 'alt' => $champion_name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
              $attrs['class'] = implode(' ', [
                  self::getSetting(self::SET_DEFAULT_CLASS),
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 1 other location - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 612..624

      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 178.

      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 8 locations. Consider refactoring.
      Open

          public static function getMinimap( int $map_id, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt' => $map_id ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 724..738
      src/DataDragonAPI/DataDragonAPI.php on lines 845..859
      src/DataDragonAPI/DataDragonAPI.php on lines 905..919
      src/DataDragonAPI/DataDragonAPI.php on lines 972..986
      src/DataDragonAPI/DataDragonAPI.php on lines 1030..1044
      src/DataDragonAPI/DataDragonAPI.php on lines 1088..1102
      src/DataDragonAPI/DataDragonAPI.php on lines 1279..1293

      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 8 locations. Consider refactoring.
      Open

          public static function getChampionIcon( string $champion_name, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt' => $champion_name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 845..859
      src/DataDragonAPI/DataDragonAPI.php on lines 905..919
      src/DataDragonAPI/DataDragonAPI.php on lines 972..986
      src/DataDragonAPI/DataDragonAPI.php on lines 1030..1044
      src/DataDragonAPI/DataDragonAPI.php on lines 1088..1102
      src/DataDragonAPI/DataDragonAPI.php on lines 1221..1235
      src/DataDragonAPI/DataDragonAPI.php on lines 1279..1293

      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 8 locations. Consider refactoring.
      Open

          public static function getItemIcon( int $item_id, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt'   => $item_id ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 724..738
      src/DataDragonAPI/DataDragonAPI.php on lines 845..859
      src/DataDragonAPI/DataDragonAPI.php on lines 905..919
      src/DataDragonAPI/DataDragonAPI.php on lines 1030..1044
      src/DataDragonAPI/DataDragonAPI.php on lines 1088..1102
      src/DataDragonAPI/DataDragonAPI.php on lines 1221..1235
      src/DataDragonAPI/DataDragonAPI.php on lines 1279..1293

      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 8 locations. Consider refactoring.
      Open

          public static function getRuneIcon( int $rune_id, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt'   => $rune_id ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 724..738
      src/DataDragonAPI/DataDragonAPI.php on lines 845..859
      src/DataDragonAPI/DataDragonAPI.php on lines 905..919
      src/DataDragonAPI/DataDragonAPI.php on lines 972..986
      src/DataDragonAPI/DataDragonAPI.php on lines 1030..1044
      src/DataDragonAPI/DataDragonAPI.php on lines 1221..1235
      src/DataDragonAPI/DataDragonAPI.php on lines 1279..1293

      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 8 locations. Consider refactoring.
      Open

          public static function getScoreboardIcon( string $name, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt' => $name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 724..738
      src/DataDragonAPI/DataDragonAPI.php on lines 845..859
      src/DataDragonAPI/DataDragonAPI.php on lines 905..919
      src/DataDragonAPI/DataDragonAPI.php on lines 972..986
      src/DataDragonAPI/DataDragonAPI.php on lines 1030..1044
      src/DataDragonAPI/DataDragonAPI.php on lines 1088..1102
      src/DataDragonAPI/DataDragonAPI.php on lines 1221..1235

      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 8 locations. Consider refactoring.
      Open

          public static function getChampionPassiveIcon( $image_name, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt'   => $image_name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 724..738
      src/DataDragonAPI/DataDragonAPI.php on lines 845..859
      src/DataDragonAPI/DataDragonAPI.php on lines 972..986
      src/DataDragonAPI/DataDragonAPI.php on lines 1030..1044
      src/DataDragonAPI/DataDragonAPI.php on lines 1088..1102
      src/DataDragonAPI/DataDragonAPI.php on lines 1221..1235
      src/DataDragonAPI/DataDragonAPI.php on lines 1279..1293

      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 8 locations. Consider refactoring.
      Open

          public static function getSpellIcon( string $spell_name, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt'   => $spell_name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 724..738
      src/DataDragonAPI/DataDragonAPI.php on lines 905..919
      src/DataDragonAPI/DataDragonAPI.php on lines 972..986
      src/DataDragonAPI/DataDragonAPI.php on lines 1030..1044
      src/DataDragonAPI/DataDragonAPI.php on lines 1088..1102
      src/DataDragonAPI/DataDragonAPI.php on lines 1221..1235
      src/DataDragonAPI/DataDragonAPI.php on lines 1279..1293

      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 8 locations. Consider refactoring.
      Open

          public static function getMasteryIcon( int $mastery_id, array $attributes = [] ): Html
          {
              self::checkInit();
      
              $attrs = array_merge([ 'alt'   => $mastery_id ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 7 other locations - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 724..738
      src/DataDragonAPI/DataDragonAPI.php on lines 845..859
      src/DataDragonAPI/DataDragonAPI.php on lines 905..919
      src/DataDragonAPI/DataDragonAPI.php on lines 972..986
      src/DataDragonAPI/DataDragonAPI.php on lines 1088..1102
      src/DataDragonAPI/DataDragonAPI.php on lines 1221..1235
      src/DataDragonAPI/DataDragonAPI.php on lines 1279..1293

      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 static function getReforgedRunePathIconO( StaticReforgedRunePathDto $runePath, array $attributes = [] ): Html
          {
              $attrs = array_merge([ 'alt'   => $runePath->name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
              $attrs['class'] = implode(' ', [
                  self::getSetting(self::SET_DEFAULT_CLASS),
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 1 other location - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 1144..1156

      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 174.

      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 static function getReforgedRuneIconO( StaticReforgedRuneDto $rune, array $attributes = [] ): Html
          {
              $attrs = array_merge([ 'alt'   => $rune->name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
              $attrs['class'] = implode(' ', [
                  self::getSetting(self::SET_DEFAULT_CLASS),
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 1 other location - About 4 hrs to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 1179..1191

      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 174.

      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
      
      require __DIR__ . "/../../LeagueAPI/_init.php";
      
      use RiotAPI\DataDragonAPI\DataDragonAPI;
      examples/DataDragonAPI/ChampionAssets/getChampionSplash_api.php on lines 1..38

      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 139.

      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
      
      require __DIR__ . "/../../LeagueAPI/_init.php";
      
      use RiotAPI\DataDragonAPI\DataDragonAPI;
      examples/DataDragonAPI/ChampionAssets/getChampionLoading_api.php on lines 1..45

      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 139.

      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
      
      require __DIR__ . "/../../../vendor/autoload.php";
      
      use RiotAPI\DataDragonAPI\DataDragonAPI;
      Severity: Major
      Found in examples/DataDragonAPI/ChampionAssets/getChampionSplash.php and 1 other location - About 1 hr to fix
      examples/DataDragonAPI/ChampionAssets/getChampionLoading.php on lines 1..47

      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 112.

      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
      
      require __DIR__ . "/../../../vendor/autoload.php";
      
      use RiotAPI\DataDragonAPI\DataDragonAPI;
      examples/DataDragonAPI/ChampionAssets/getChampionSplash.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 112.

      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 static function _summonerSpell( string $url, array $data )
          {
              $url .= self::STATIC_SUMMONERSPELLS_BY_KEY;
              $data_by_key = $data;
              $data_by_key['data'] = [];
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 1 other location - About 1 hr to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 1656..1668

      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 106.

      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 static function _champion( string $url, array $data )
          {
              $url .= self::STATIC_CHAMPION_BY_KEY;
              $data_by_key = $data;
              $data_by_key['data'] = [];
      Severity: Major
      Found in src/DataDragonAPI/DataDragonAPI.php and 1 other location - About 1 hr to fix
      src/DataDragonAPI/DataDragonAPI.php on lines 1634..1646

      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 106.

      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