eveseat/eveapi

View on GitHub

Showing 103 of 440 total issues

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

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

        $response = $this->retrieve([
Severity: Minor
Found in src/Jobs/Fittings/Character/Fittings.php - About 1 hr to fix

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

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

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

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

        Method enqueueDetailedCorporationContractsJobs has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function enqueueDetailedCorporationContractsJobs(array $contract_ids)
            {
                CorporationContract::whereIn('contract_id', $contract_ids)
                    ->whereHas('detail', function ($query) {
                        $query->where('status', '<>', 'deleted');
        Severity: Minor
        Found in src/Commands/Esi/Update/Contracts.php - About 1 hr to fix

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

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

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

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

              Function handle has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function handle()
                  {
              
                      $this->line('SeAT Token Upgrader');
              
              
              Severity: Minor
              Found in src/Commands/Seat/Tokens/Upgrade.php - About 1 hr 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 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function handle()
                  {
                      while (true) {
              
                          $response = $this->retrieve([
              Severity: Minor
              Found in src/Jobs/Killmails/Character/Recent.php - About 1 hr to fix

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

                    public function handle()
                    {
                        parent::handle();
                
                        // Perform a journal walk backwards to get all of the
                Severity: Minor
                Found in src/Jobs/Wallet/Character/Transactions.php - About 1 hr to fix

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

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

                    Method addCommands has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function addCommands()
                        {
                            $this->commands([
                                // Buckets
                                \Seat\Eveapi\Commands\Seat\Buckets\Info::class,
                    Severity: Minor
                    Found in src/EveapiServiceProvider.php - About 1 hr to fix

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

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

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

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

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

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

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

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

                              Method fromEsi has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function fromEsi($esi_structure): ContractDetail
                                  {
                                      $this->fill([
                                          'issuer_id' => $esi_structure->issuer_id,
                                          'issuer_corporation_id' => $esi_structure->issuer_corporation_id,
                              Severity: Minor
                              Found in src/Models/Contracts/ContractDetail.php - About 1 hr to fix

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

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

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

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

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

                                        public function handle(EsiBase $job, Closure $next): void
                                        {
                                            // bypass control if the class is not related to ESI or is the ESI ping job
                                            if ($job instanceof Esi) {
                                                logger()->debug(
                                    Severity: Minor
                                    Found in src/Jobs/Middleware/CheckEsiRouteStatus.php - About 1 hr to fix

                                      Function handleEsiFailedCall has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          private function handleEsiFailedCall(RequestFailedException $exception)
                                          {
                                              // increment ESI rate limit
                                              $this->incrementEsiRateLimit();
                                      
                                      
                                      Severity: Minor
                                      Found in src/Jobs/EsiBase.php - About 55 mins 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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language