eveseat/eveapi

View on GitHub

Showing 440 of 440 total issues

CharacterInfo has 42 functions (exceeds 20 allowed). Consider refactoring.
Open

class CharacterInfo extends ExtensibleModel
{
    use HasFactory, NotableTrait;

    /**
Severity: Minor
Found in src/Models/Character/CharacterInfo.php - About 5 hrs to fix

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

    <?php
    
    /*
     * This file is part of SeAT
     *
    Severity: Major
    Found in src/Jobs/AbstractAllianceJob.php and 1 other location - About 5 hrs to fix
    src/Jobs/AbstractCorporationJob.php on lines 1..90

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

    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
    
    /*
     * This file is part of SeAT
     *
    Severity: Major
    Found in src/Jobs/AbstractCorporationJob.php and 1 other location - About 5 hrs to fix
    src/Jobs/AbstractAllianceJob.php on lines 1..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 195.

    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

    CorporationInfo has 39 functions (exceeds 20 allowed). Consider refactoring.
    Open

    #[OA\Schema(
        title: 'CorporationInfo',
        description: 'Corporation Sheet',
        properties: [
            new OA\Property(property: 'name', description: 'The name of the corporation', type: 'string'),
    Severity: Minor
    Found in src/Models/Corporation/CorporationInfo.php - About 5 hrs to fix

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

      #[OA\Schema(
          title: 'CharacterOrder',
          description: 'Character Order',
          properties: [
              new OA\Property(property: 'order_id', description: 'The market order ID', type: 'integer', format: 'int64'),
      Severity: Major
      Found in src/Models/Market/CharacterOrder.php and 1 other location - About 4 hrs to fix
      src/Models/Market/CorporationOrder.php on lines 31..109

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

      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

      #[OA\Schema(
          title: 'CorporationOrder',
          description: 'Corporation Order',
          properties: [
              new OA\Property(property: 'order_id', description: 'The market order ID', type: 'integer', format: 'int64'),
      Severity: Major
      Found in src/Models/Market/CorporationOrder.php and 1 other location - About 4 hrs to fix
      src/Models/Market/CharacterOrder.php on lines 31..107

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

      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 handle has 120 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function handle()
          {
              $response = $this->retrieve([
                  'character_id' => $this->getCharacterId(),
                  'planet_id' => $this->planet_id,
      Severity: Major
      Found in src/Jobs/PlanetaryInteraction/Character/PlanetDetail.php - About 4 hrs to fix

        Method getSchedules has 110 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getSchedules(): array
            {
                $schedules = [
                    [   // ESI Status | Every Minute
                        'command' => 'esi:update:status',
        Severity: Major
        Found in src/database/seeders/ScheduleSeeder.php - About 4 hrs to fix

          Method handle has 88 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function handle()
              {
          
                  // Start by warning the user about the command that will be run
                  $this->comment('Warning! This Laravel command uses exec() to execute a ');
          Severity: Major
          Found in src/Commands/Eve/Update/Sde.php - About 3 hrs to fix

            File Sde.php has 307 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            /*
             * This file is part of SeAT
             *
            Severity: Minor
            Found in src/Commands/Eve/Update/Sde.php - About 3 hrs to fix

              The class CharacterInfo has 41 public methods. Consider refactoring CharacterInfo to keep number of public methods under 10.
              Open

              class CharacterInfo extends ExtensibleModel
              {
                  use HasFactory, NotableTrait;
              
                  /**

              TooManyPublicMethods

              Since: 0.1

              A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

              By default it ignores methods starting with 'get' or 'set'.

              Example

              Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

              The class CharacterInfo has 42 non-getter- and setter-methods. Consider refactoring CharacterInfo to keep number of methods under 25.
              Open

              class CharacterInfo extends ExtensibleModel
              {
                  use HasFactory, NotableTrait;
              
                  /**

              TooManyMethods

              Since: 0.1

              A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

              By default it ignores methods starting with 'get' or 'set'.

              The default was changed from 10 to 25 in PHPMD 2.3.

              Example

              Source https://phpmd.org/rules/codesize.html#toomanymethods

              Method handle has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function handle()
                  {
                      parent::handle();
              
                      // all items which need to be singleton
              Severity: Major
              Found in src/Jobs/Assets/Corporation/Locations.php - About 3 hrs to fix

                Method handle has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function handle()
                    {
                        parent::handle();
                
                        // Get the assets for this character, chunked in a number of blocks
                Severity: Major
                Found in src/Jobs/Assets/Character/Locations.php - About 3 hrs to fix

                  MapDenormalize has 27 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  #[OA\Schema(
                      title: 'MapDenormalize',
                      description: 'Map Denormalize',
                      properties: [
                          new OA\Property(property: 'itemID', description: 'The entity ID', type: 'integer'),
                  Severity: Minor
                  Found in src/Models/Sde/MapDenormalize.php - About 3 hrs to fix

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

                                    $chunk->each(function ($asset) use ($structure_batch, $start) {
                    
                                        $model = CorporationAsset::firstOrNew([
                                            'item_id' => $asset->item_id,
                                        ]);
                    Severity: Major
                    Found in src/Jobs/Assets/Corporation/Assets.php and 1 other location - About 3 hrs to fix
                    src/Jobs/Assets/Character/Assets.php on lines 101..120

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

                    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

                                $assets->each(function ($asset) use ($structure_batch, $start) {
                    
                                    $model = CharacterAsset::firstOrNew([
                                        'item_id' => $asset->item_id,
                                    ]);
                    Severity: Major
                    Found in src/Jobs/Assets/Character/Assets.php and 1 other location - About 3 hrs to fix
                    src/Jobs/Assets/Corporation/Assets.php on lines 109..128

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

                    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
                    
                    /*
                     * This file is part of SeAT
                     *
                    Severity: Major
                    Found in src/Models/Sde/Star.php and 1 other location - About 3 hrs to fix
                    src/Models/Sde/Region.php on lines 1..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 144.

                    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

                            CorporationAsset::join('invTypes', 'type_id', '=', 'typeID')
                                ->join('invGroups', 'invGroups.groupID', '=', 'invTypes.groupID')
                                ->where('corporation_id', $this->getCorporationId())
                                ->where('is_singleton', true)// only singleton items may be named
                                // it seems only items from that categories can be named
                    Severity: Major
                    Found in src/Jobs/Assets/Corporation/Names.php and 1 other location - About 3 hrs to fix
                    src/Jobs/Assets/Character/Names.php on lines 88..117

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

                    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
                    
                    /*
                     * This file is part of SeAT
                     *
                    Severity: Major
                    Found in src/Models/Sde/Region.php and 1 other location - About 3 hrs to fix
                    src/Models/Sde/Star.php on lines 1..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 144.

                    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