eveseat/eveapi

View on GitHub

Showing 440 of 440 total issues

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

    public function handle()
    {
        parent::handle();

        $structure_batch = new StructureBatch();
Severity: Minor
Found in src/Jobs/Clones/Clones.php - About 1 hr to fix

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

        public function handle()
        {
    
            $this->existing_entity_ids = UniverseName::select('entity_id')
                ->distinct()
    Severity: Minor
    Found in src/Jobs/Universe/Names.php - About 1 hr to fix

      Method addAuthenticatedJobs has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected function addAuthenticatedJobs()
          {
              $this->addAuthenticatedJob(new Roles($this->token));
              $this->addAuthenticatedJob(new Titles($this->token));
              $this->addAuthenticatedJob(new Clones($this->token));
      Severity: Minor
      Found in src/Bus/Character.php - About 1 hr to fix

        Method customValidationMessages has 36 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: Minor
        Found in src/Mapping/Sde/MapDenormalizeMapping.php - About 1 hr to fix

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

              public function handle()
              {
                  parent::handle();
          
                  while (true) {
          Severity: Minor
          Found in src/Jobs/Corporation/RoleHistories.php - About 1 hr to fix

            Method addAuthenticatedJobs has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected function addAuthenticatedJobs()
                {
                    $this->addAuthenticatedJob(new Divisions($this->corporation_id, $this->token));
            
                    $this->addAuthenticatedJob(new Roles($this->corporation_id, $this->token));
            Severity: Minor
            Found in src/Bus/Corporation.php - About 1 hr to fix

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

                  public function handle()
                  {
                      parent::handle();
              
                      $response = $this->retrieve([
              Severity: Minor
              Found in src/Jobs/Corporation/Roles.php - About 1 hr to fix

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

                    public function getActivationFuelConsumptionAttribute()
                    {
                        $use = $this->items->sum(function ($item) {
                            return $item->type->dogma_attributes->where('attributeID', self::DGM_SERVICE_MODULE_ACTIVATION_FUEL_NEED)
                                ->sum('valueFloat');
                Severity: Major
                Found in src/Models/Corporation/CorporationStructure.php and 1 other location - About 1 hr to fix
                src/Models/Corporation/CorporationStructure.php on lines 171..184

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

                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 getFuelConsumptionAttribute()
                    {
                        $use = $this->items->sum(function ($item) {
                            return $item->type->dogma_attributes->where('attributeID', self::DGM_SERVICE_MODULE_CYCLE_FUEL_NEED)
                                ->sum('valueFloat');
                Severity: Major
                Found in src/Models/Corporation/CorporationStructure.php and 1 other location - About 1 hr to fix
                src/Models/Corporation/CorporationStructure.php on lines 189..202

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

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

                    public function handle()
                    {
                        parent::handle();
                
                        CorporationWalletBalance::where('corporation_id', $this->getCorporationId())->get()
                Severity: Minor
                Found in src/Jobs/Wallet/Corporation/Transactions.php - About 1 hr to fix

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

                      public function handle()
                      {
                          parent::handle();
                  
                          $response = $this->retrieve([
                  Severity: Minor
                  Found in src/Jobs/Corporation/Titles.php - About 1 hr to fix

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

                        public function handle()
                        {
                            parent::handle();
                    
                            $start = now();
                    Severity: Minor
                    Found in src/Jobs/Assets/Corporation/Assets.php - About 1 hr to fix

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

                          public function handle()
                          {
                      
                              $structure_batch = new StructureBatch();
                      
                      
                      Severity: Minor
                      Found in src/Jobs/Contracts/Character/Contracts.php - About 1 hr to fix

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

                            public function handle()
                            {
                                $structure_batch = new StructureBatch();
                        
                                while (true) {
                        Severity: Minor
                        Found in src/Jobs/Contracts/Corporation/Contracts.php - About 1 hr to fix

                          Method toEve has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function toEve()
                              {
                                  return sprintf('[%s, %s]', $this->ship->typeName, $this->name) . PHP_EOL .
                          
                                  $this->low_slots->map(function ($slot) {
                          Severity: Minor
                          Found in src/Models/Fittings/CharacterFitting.php - About 1 hr to fix

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

                                public function handle()
                                {
                                    parent::handle();
                            
                                    while (true) {
                            Severity: Minor
                            Found in src/Jobs/Industry/Character/Mining.php - About 1 hr to fix

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

                                  public function handle()
                                  {
                                      $threshold = $this->getBucketThreshold();
                                      $bucket = Bucket::with('refresh_tokens', 'refresh_tokens.character')
                                          ->withCount('refresh_tokens')
                              Severity: Minor
                              Found in src/Commands/Seat/Buckets/Info.php - About 1 hr to fix

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

                                    public function handle()
                                    {
                                        parent::handle();
                                
                                        // retrieve latest known journal entry for the active character.
                                Severity: Minor
                                Found in src/Jobs/Wallet/Character/Journal.php - About 1 hr to fix

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

                                      public function handle()
                                      {
                                          parent::handle();
                                  
                                          $event_ids = CharacterCalendarEvent::where('character_id', $this->getCharacterId())
                                  Severity: Minor
                                  Found in src/Jobs/Calendar/Detail.php - About 1 hr to fix

                                    Method find_nearest_celestial has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function find_nearest_celestial(int $solar_system_id, float $x, float $y, float $z, ?int $group = null): array
                                        {
                                    
                                            // Querying mapDenormalized with [1] we can see
                                            // the available different group types in the
                                    Severity: Minor
                                    Found in src/Traits/Utils.php - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language