feat(06-sonarqube-quality): split god classes — ShopproOrdersSyncService + AllegroIntegrationController (06-05)
ShopproOrdersSyncService: 39→9 methods via ShopproOrderMapper + ShopproProductImageResolver. AllegroIntegrationController: 35→25 methods via AllegroStatusMappingController + AllegroDeliveryMappingController. S1448 violations: 6x→2x. CronHandlerFactory and routes/web.php updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,8 +17,10 @@ use App\Modules\Settings\AllegroStatusSyncService;
|
||||
use App\Modules\Settings\AllegroTokenManager;
|
||||
use App\Modules\Settings\ShopproApiClient;
|
||||
use App\Modules\Settings\ShopproIntegrationsRepository;
|
||||
use App\Modules\Settings\ShopproOrderMapper;
|
||||
use App\Modules\Settings\ShopproOrdersSyncService;
|
||||
use App\Modules\Settings\ShopproOrderSyncStateRepository;
|
||||
use App\Modules\Settings\ShopproProductImageResolver;
|
||||
use App\Modules\Settings\ShopproPaymentStatusSyncService;
|
||||
use App\Modules\Settings\ShopproStatusMappingRepository;
|
||||
use App\Modules\Settings\ShopproStatusSyncService;
|
||||
@@ -54,13 +56,16 @@ final class CronHandlerFactory
|
||||
$orderImportService
|
||||
);
|
||||
$shopproIntegrationsRepo = new ShopproIntegrationsRepository($this->db, $this->integrationSecret);
|
||||
$shopproApiClient = new ShopproApiClient();
|
||||
$shopproSyncService = new ShopproOrdersSyncService(
|
||||
$shopproIntegrationsRepo,
|
||||
new ShopproOrderSyncStateRepository($this->db),
|
||||
new ShopproApiClient(),
|
||||
$shopproApiClient,
|
||||
new OrderImportRepository($this->db),
|
||||
new ShopproStatusMappingRepository($this->db),
|
||||
new OrdersRepository($this->db)
|
||||
new OrdersRepository($this->db),
|
||||
new ShopproOrderMapper(),
|
||||
new ShopproProductImageResolver($shopproApiClient)
|
||||
);
|
||||
$shopproStatusSyncService = new ShopproStatusSyncService($shopproIntegrationsRepo, $shopproSyncService);
|
||||
$shopproPaymentSyncService = new ShopproPaymentStatusSyncService(
|
||||
|
||||
Reference in New Issue
Block a user