M3 Security Fixes for scan command pass 33 major code smell fixes and style fixes
This commit is contained in:
@@ -8,11 +8,11 @@ use Illuminate\Console\Command;
|
||||
use Illuminate\Http\Request;
|
||||
use Log;
|
||||
use Modules\M3\Http\Controllers\API\CloseShipment;
|
||||
use Str;
|
||||
|
||||
class CallCloseAPI extends Command
|
||||
{
|
||||
protected $signature = 'command:CallCloseAPI {user?} {manifest?} {co?} {whs?} ';
|
||||
|
||||
protected $description = 'Call Close API';
|
||||
|
||||
public function handle()
|
||||
@@ -24,9 +24,11 @@ class CallCloseAPI extends Command
|
||||
return $this->closeSpecificManifest($manifest, (string) ($this->argument('co') ?? ''), (string) ($this->argument('whs') ?? ''));
|
||||
}
|
||||
$this->closePendingManifests();
|
||||
|
||||
return self::SUCCESS;
|
||||
} catch (\Throwable $th) {
|
||||
Log::channel('dailyCron')->error($th);
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -55,9 +57,11 @@ class CallCloseAPI extends Command
|
||||
->where('APSPARE2', '')->where('APCO', $co)->where('APWHS', $whs)->where('APMANIFEST', $manifest)->exists();
|
||||
if (! $exists) {
|
||||
Log::channel('dailyCron')->warning('Manifest not available for close', compact('manifest', 'co', 'whs'));
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
$this->closeManifest($manifest, $co, $whs);
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user