eveseat/eveapi

View on GitHub

Showing 103 of 440 total issues

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

    public function check_storage()
    {

        $this->line(' * Checking storage');

Severity: Minor
Found in src/Commands/Seat/Admin/Diagnose.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

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

    public function handle()
    {
        while (true) {

            $response = $this->retrieve([
Severity: Minor
Found in src/Jobs/Killmails/Corporation/Recent.php - About 45 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

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

    public function handle()
    {
        while (true) {

            $response = $this->retrieve([
Severity: Minor
Found in src/Jobs/Killmails/Character/Recent.php - About 45 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

Function handle has a Cognitive Complexity of 8 (exceeds 5 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 45 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

Function downloadStaticFiles has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    private function downloadStaticFiles(array $seeders)
    {
        foreach ($seeders as $seeder) {

            if (! is_subclass_of($seeder, AbstractSdeSeeder::class))
Severity: Minor
Found in src/database/seeders/Sde/SdeSeeder.php - About 45 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

Method find_nearest_celestial has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function find_nearest_celestial(int $solar_system_id, float $x, float $y, float $z, ?int $group = null): array
Severity: Minor
Found in src/Traits/Utils.php - About 35 mins to fix

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

        public function handle(JobExceptionOccurred $event)
        {
            try {
                // if esi tell us that used token is permanently invalid
                // remove it from the system and mark job as failed.
    Severity: Minor
    Found in src/Listeners/EsiFailedCall.php - About 35 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

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

        public function handle()
        {
            $region_id = setting('market_prices_region_id', true) ?: self::THE_FORGE;
    
            $types = collect();
    Severity: Minor
    Found in src/Jobs/Market/DispatchHistoryJobs.php - About 35 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

    Function make has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function make(Model $model, $data, array $overrides = []): Model
        {
            // merge both mapping and overrides to build final mapping rules
            $rules = array_merge(static::$mapping, $overrides);
    
    
    Severity: Minor
    Found in src/Mapping/DataMapping.php - About 35 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

    Function seedTable has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        final protected function seedTable(): void
        {
            $sde_dump = $this->getSdeName();
            $path = storage_path("sde/$sde_dump.csv");
    
    
    Severity: Minor
    Found in src/database/seeders/Sde/AbstractSdeSeeder.php - About 35 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

    Avoid too many return statements within this method.
    Open

                return $this::INVALID;
    Severity: Major
    Found in src/Commands/Eve/Update/Sde.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return $this::SUCCESS;
      Severity: Major
      Found in src/Commands/Eve/Update/Sde.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return;
        Severity: Major
        Found in src/Jobs/Market/History.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return $this->handleGenericJobs($class);
          Severity: Major
          Found in src/Commands/Esi/Job/Dispatch.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return $this->handlePublicCorporationJobs($class);
            Severity: Major
            Found in src/Commands/Esi/Job/Dispatch.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return $type->marketGroupID == 2401;
              Severity: Major
              Found in src/Models/Sde/MapDenormalize.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return $this::SUCCESS;
                Severity: Major
                Found in src/Commands/Eve/Update/Sde.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return;
                  Severity: Major
                  Found in src/Jobs/Market/Corporation/History.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                    return true;
                    Severity: Major
                    Found in src/Jobs/Market/History.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return ! in_array($type->marketGroupID, [2396, 2397, 2398, 2400, 2401]);
                      Severity: Major
                      Found in src/Models/Sde/MapDenormalize.php - About 30 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language