Olivier Massot 1 년 전
부모
커밋
023f5ac90c
2개의 변경된 파일3개의 추가작업 그리고 10개의 파일을 삭제
  1. 3 9
      src/Service/Dolibarr/DolibarrSyncService.php
  2. 0 1
      tests/Unit/Service/Dolibarr/DolibarrSyncServiceTest.php

+ 3 - 9
src/Service/Dolibarr/DolibarrSyncService.php

@@ -32,12 +32,6 @@ use libphonenumber\PhoneNumberFormat;
 use libphonenumber\PhoneNumberUtil;
 use Psr\Log\LoggerInterface;
 use Symfony\Component\HttpKernel\Exception\HttpException;
-use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
-use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
-use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
-use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
-use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
-use Symfony\Contracts\HttpClient\ResponseInterface;
 use Symfony\Contracts\Service\Attribute\Required;
 use Symfony\Contracts\Translation\TranslatorInterface;
 
@@ -329,9 +323,9 @@ class DolibarrSyncService
             // Update Billing service contact (if existing)
             foreach ($dolibarrSocietyContacts as $contactData) {
                 if (
-                    strtolower($contactData['lastname']) === 'service facturation' &&
-                    empty($contactData['name']) &&
-                    empty($contactData['array_options']['options_2iopen_person_id'])
+                    'service facturation' === strtolower($contactData['lastname'])
+                    && empty($contactData['name'])
+                    && empty($contactData['array_options']['options_2iopen_person_id'])
                 ) {
                     $billingAddress = $this->getOrganizationBillingPostalAddress($organization);
                     $newContactData = $contactData;

+ 0 - 1
tests/Unit/Service/Dolibarr/DolibarrSyncServiceTest.php

@@ -40,7 +40,6 @@ use libphonenumber\PhoneNumberUtil;
 use PHPUnit\Framework\MockObject\MockObject;
 use PHPUnit\Framework\TestCase;
 use Psr\Log\LoggerInterface;
-use Symfony\Component\HttpClient\Exception\ServerException;
 use Symfony\Contracts\HttpClient\ResponseInterface;
 use Symfony\Contracts\Translation\TranslatorInterface;