eveseat/eveapi

View on GitHub

Showing 103 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

    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

      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

              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

                    CorporationStructure has 25 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    #[OA\Schema(
                        title: 'CorporationStructure',
                        description: 'Corporation Structure',
                        properties: [
                            new OA\Property(property: 'structure_id', description: 'Structure unique identifier', type: 'integer', format: 'int64'),
                    Severity: Minor
                    Found in src/Models/Corporation/CorporationStructure.php - About 2 hrs to fix

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

                          public function handle()
                          {
                              if ($this->batchId && $this->batch()->cancelled()) {
                                  logger()->debug(sprintf('[Jobs][%s] Orders - Cancelling job due to relevant batch %s cancellation.', $this->job->getJobId(), $this->batch()->id));
                      
                      
                      Severity: Major
                      Found in src/Jobs/Market/History.php - About 2 hrs to fix

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

                            public function handle()
                            {
                        
                                $this->line('SeAT Token Upgrader');
                        
                        
                        Severity: Major
                        Found in src/Commands/Seat/Tokens/Upgrade.php - About 2 hrs to fix

                          Function handle has a Cognitive Complexity of 18 (exceeds 5 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: Minor
                          Found in src/Commands/Eve/Update/Sde.php - About 2 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

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

                              public function handle()
                              {
                                  parent::handle();
                          
                                  while (true) {
                          Severity: Major
                          Found in src/Jobs/Corporation/Structures.php - About 2 hrs to fix

                            File PlanetDetail.php has 262 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            <?php
                            
                            /*
                             * This file is part of SeAT
                             *
                            Severity: Minor
                            Found in src/Jobs/PlanetaryInteraction/Character/PlanetDetail.php - About 2 hrs to fix

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

                                  public function handle()
                                  {
                                      $response = $this->retrieve([
                                          'killmail_id' => $this->killmail_id,
                                          'killmail_hash' => $this->killmail_hash,
                              Severity: Major
                              Found in src/Jobs/Killmails/Detail.php - About 2 hrs to fix

                                File CorporationInfo.php has 254 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                <?php
                                
                                /*
                                 * This file is part of SeAT
                                 *
                                Severity: Minor
                                Found in src/Models/Corporation/CorporationInfo.php - About 2 hrs to fix

                                  File CharacterInfo.php has 254 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  <?php
                                  
                                  /*
                                   * This file is part of SeAT
                                   *
                                  Severity: Minor
                                  Found in src/Models/Character/CharacterInfo.php - About 2 hrs to fix

                                    Method customValidationMessages has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function customValidationMessages()
                                        {
                                            return [
                                                '0.integer' => self::INTEGER_VALIDATION_MESSAGE,
                                                '0.between' => self::BETWEEN_VALIDATION_MESSAGE,
                                    Severity: Major
                                    Found in src/Mapping/Sde/StaStationMapping.php - About 2 hrs to fix

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

                                          public function handle()
                                          {
                                              $job_start_time = now();
                                      
                                              // the region_id cached to speed up execution of the loop
                                      Severity: Minor
                                      Found in src/Jobs/Market/Orders.php - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language