feat(06-sonarqube-quality): extract string literals to constants (S1192 fix)
- Add IntegrationSources {ALLEGRO, SHOPPRO, APACZKA, INPOST} and RedirectPaths constants in src/Core/Constants/
- Replace integration source literals in AllegroOrderImportService, AllegroStatusSyncService, ShopproOrdersSyncService, ShopproPaymentStatusSyncService
- Replace redirect path literals in AllegroIntegrationController (24+ occurrences) and ShopproIntegrationsController (3 occurrences)
- Auto-fix: broken use statements from plan 06-01 in AllegroOrderImportService and AllegroIntegrationController (missing backslashes)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Modules\Settings;
|
||||
|
||||
use App\Core\Constants\IntegrationSources;
|
||||
use App\Core\Support\StringHelper;
|
||||
use App\Modules\Orders\OrderImportRepository;
|
||||
use App\Modules\Orders\OrdersRepository;
|
||||
@@ -420,10 +421,10 @@ final class ShopproOrdersSyncService
|
||||
|
||||
$order = [
|
||||
'integration_id' => $integrationId,
|
||||
'source' => 'shoppro',
|
||||
'source' => IntegrationSources::SHOPPRO,
|
||||
'source_order_id' => $sourceOrderId,
|
||||
'external_order_id' => $sourceOrderId,
|
||||
'external_platform_id' => 'shoppro',
|
||||
'external_platform_id' => IntegrationSources::SHOPPRO,
|
||||
'external_platform_account_id' => null,
|
||||
'external_status_id' => $effectiveStatus,
|
||||
'external_payment_type_id' => StringHelper::nullableString((string) $this->readPath($payload, ['payment_method', 'payment.method', 'payments.method'])),
|
||||
|
||||
Reference in New Issue
Block a user