seatplus/eveapi

View on GitHub

Showing 5 of 159 total issues

File CheckJobsCommand.php has 277 lines of code (exceeds 250 allowed). Consider refactoring.
Confirmed

<?php
 
/*
* MIT License
*
Severity: Minor
Found in src/Commands/CheckJobsCommand.php - About 2 hrs to fix

    Function handleException has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    private function handleException(RequestFailedException $exception): void
    {
    // If error is in 4xx or 5xx range increase esi rate limit
    if (($exception->getOriginalException()->getCode() >= 400) && ($exception->getOriginalException()->getCode() <= 599)) {
    $this->incrementEsiRateLimit();
    Severity: Minor
    Found in src/Services/Esi/RetrieveEsiData.php - About 1 hr to fix

    Method persist has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Confirmed

    private function persist(Collection $contracts): void
    {
    Contract::upsert(
    $contracts->toArray(),
    ['contract_id'],
    Severity: Minor
    Found in src/Jobs/Contracts/CharacterContractsJob.php - About 1 hr to fix

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

      public function handle(int $location_id): void
      {
      $location = Location::with('locatable')->firstOrNew([
      'location_id' => $location_id,
      ]);
      Severity: Minor
      Found in src/Services/ResolveLocation/ResolveLocationService.php - About 35 mins to fix

      Function failed has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Confirmed

      public function failed(Throwable $exception): void
      {
      if ($exception instanceof MaxAttemptsExceededException) {
      $this->delete();
      logger()->info('deleted job because MaxAttemptsException');
      Severity: Minor
      Found in src/Jobs/Universe/ResolveUniverseStructureByIdJob.php - About 35 mins to fix
      Severity
      Category
      Status
      Source
      Language