M3 Security Fixes for scan command pass 33 major code smell fixes and style fixes

This commit is contained in:
Mark Gregory
2026-09-17 11:34:41 +01:00
parent 0a05f05843
commit 0c445f89af
69 changed files with 1786 additions and 1752 deletions
+5 -1
View File
@@ -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;
}