Pint: Formatierung des bisherigen Stands, ohne inhaltliche Aenderung

Die Dateien lagen im Arbeitsbaum formatiert und inhaltlich geaendert
zusammen. Dieser Commit enthaelt nur die Pint-Formatierung des alten
Stands, damit die folgenden Commits nur noch Inhalt zeigen.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kevin 2026-09-23 15:39:17 +00:00
parent bdef77462d
commit 316a9b76d6
33 changed files with 880 additions and 841 deletions

View file

@ -5,6 +5,7 @@ namespace App\Jobs;
use Acme\Dhl\Models\DhlShipment;
use Acme\Dhl\Services\ShippingService;
use Acme\Dhl\Support\DhlClient;
use App\Http\Controllers\SettingController;
use Exception;
use Illuminate\Bus\Queueable as BusQueueable;
use Illuminate\Contracts\Queue\ShouldQueue;
@ -15,7 +16,7 @@ use Illuminate\Support\Facades\Log;
/**
* Job to cancel DHL shipments asynchronously
*
*
* This job handles the cancellation of DHL shipments in the background,
* preventing API timeouts and improving user experience.
*/
@ -49,9 +50,6 @@ class CancelShipmentJob implements ShouldQueue
/**
* Create a new job instance.
*
* @param DhlShipment $dhlShipment
* @param array $options
*/
public function __construct(DhlShipment $dhlShipment, array $options = [])
{
@ -79,7 +77,7 @@ class CancelShipmentJob implements ShouldQueue
]);
// Get DHL configuration
$settingController = new \App\Http\Controllers\SettingController;
$settingController = new SettingController;
$dhlConfig = $settingController->getDhlConfig();
// Create DHL client
@ -132,8 +130,6 @@ class CancelShipmentJob implements ShouldQueue
/**
* Handle a job failure.
*
* @param Exception $exception
*/
public function failed(Exception $exception): void
{

View file

@ -2,6 +2,9 @@
namespace App\Jobs;
use Acme\Dhl\Services\ShippingService;
use Acme\Dhl\Support\DhlClient;
use App\Http\Controllers\SettingController;
use App\Models\ShoppingOrder;
use App\Services\DhlDataHelper;
use Exception;
@ -92,16 +95,16 @@ class CreateShipmentJob implements ShouldQueue
]);
// Load DHL configuration here, never from the serialized job payload.
$dhlConfig = (new \App\Http\Controllers\SettingController)->getDhlConfig();
$dhlConfig = (new SettingController)->getDhlConfig();
$dhlClient = new \Acme\Dhl\Support\DhlClient(
$dhlClient = new DhlClient(
$dhlConfig['base_url'],
$dhlConfig['api_key'],
$dhlConfig['username'],
$dhlConfig['password']
);
$shippingService = new \Acme\Dhl\Services\ShippingService($dhlClient);
$shippingService = new ShippingService($dhlClient);
// Prepare order data using helper
$orderData = DhlDataHelper::prepareOrderData($this->shoppingOrder, $this->weight, $this->options, $dhlConfig);