Olivier Massot 1 rok temu
rodzic
commit
6fce068db1

+ 10 - 17
src/Entity/Public/PublicEvent.php

@@ -4,19 +4,19 @@ declare(strict_types=1);
 
 namespace App\Entity\Public;
 
-use ApiPlatform\Metadata\Get;
-use Doctrine\ORM\Mapping as ORM;
-use ApiPlatform\Metadata\ApiFilter;
-use ApiPlatform\Metadata\ApiResource;
-use ApiPlatform\Metadata\GetCollection;
 use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
+use ApiPlatform\Doctrine\Orm\Filter\NumericFilter;
 use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
 use ApiPlatform\Doctrine\Orm\Filter\RangeFilter;
-use App\Filter\ApiPlatform\Utils\DistanceFilter;
-use App\Repository\Public\PublicEventRepository;
 use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
-use ApiPlatform\Doctrine\Orm\Filter\NumericFilter;
+use ApiPlatform\Metadata\ApiFilter;
+use ApiPlatform\Metadata\ApiResource;
+use ApiPlatform\Metadata\Get;
+use ApiPlatform\Metadata\GetCollection;
 use App\Filter\ApiPlatform\Utils\ArrayFieldFilter;
+use App\Filter\ApiPlatform\Utils\DistanceFilter;
+use App\Repository\Public\PublicEventRepository;
+use Doctrine\ORM\Mapping as ORM;
 
 /**
  * Évènements publics tels que publiés sur l'agenda du site opentalent ou les sites des structures.
@@ -43,7 +43,6 @@ use App\Filter\ApiPlatform\Utils\ArrayFieldFilter;
 #[ApiFilter(filterClass: OrderFilter::class, properties: ['datetimeStart', 'datetimeEnd'], arguments: ['orderParameterName' => 'order'])]
 #[ApiFilter(filterClass: RangeFilter::class, properties: ['priceMini', 'priceMaxi'])]
 #[ApiFilter(filterClass: ArrayFieldFilter::class, properties: ['categories'])]
-
 class PublicEvent
 {
     #[ORM\Id]
@@ -399,13 +398,10 @@ class PublicEvent
         return $this->priceMini;
     }
 
-    /**
-     * @param int $priceMini
-     * @return PublicEvent
-     */
     public function setPriceMini(int $priceMini): PublicEvent
     {
         $this->priceMini = $priceMini;
+
         return $this;
     }
 
@@ -414,13 +410,10 @@ class PublicEvent
         return $this->priceMaxi;
     }
 
-    /**
-     * @param int $priceMaxi
-     * @return PublicEvent
-     */
     public function setPriceMaxi(int $priceMaxi): PublicEvent
     {
         $this->priceMaxi = $priceMaxi;
+
         return $this;
     }
 

+ 6 - 13
src/Filter/ApiPlatform/Utils/ArrayFieldFilter.php

@@ -6,13 +6,13 @@ namespace App\Filter\ApiPlatform\Utils;
 
 use ApiPlatform\Doctrine\Orm\Filter\AbstractFilter;
 use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
-use Doctrine\ORM\QueryBuilder;
 use ApiPlatform\Metadata\Operation;
+use Doctrine\ORM\QueryBuilder;
 
 /**
  * Cette classe est un filtre personnalisé pour les champs de type array
- * Elle recherche des correspondances partielles dans un champ de type array JSON
- * 
+ * Elle recherche des correspondances partielles dans un champ de type array JSON.
+ *
  * différences avec le filtre InFilter:
  * - ArrayFieldFilter recherche des correspondances partielles
  * - InFilter utilise la clause SQL IN pour rechercher des correspondances exactes
@@ -22,12 +22,6 @@ use ApiPlatform\Metadata\Operation;
 class ArrayFieldFilter extends AbstractFilter
 {
     /**
-     * @param string $property
-     * @param mixed $value
-     * @param QueryBuilder $queryBuilder
-     * @param QueryNameGeneratorInterface $queryNameGenerator
-     * @param string $resourceClass
-     * @param Operation|null $operation
      * @param array<mixed> $context
      */
     protected function filterProperty(
@@ -49,20 +43,19 @@ class ArrayFieldFilter extends AbstractFilter
         if (is_array($valueArray)) {
             $queryBuilder->andWhere($queryBuilder->expr()->orX(
                 ...array_map(function ($val) use ($queryBuilder, $property, $parameterName) {
-                    return $queryBuilder->expr()->like(sprintf('o.%s', $property), ':' . $parameterName);
+                    return $queryBuilder->expr()->like(sprintf('o.%s', $property), ':'.$parameterName);
                 }, $valueArray)
             ));
             foreach ($valueArray as $key => $val) {
-                $queryBuilder->setParameter($parameterName, '%' . $val . '%');
+                $queryBuilder->setParameter($parameterName, '%'.$val.'%');
             }
         } else {
             $queryBuilder->andWhere(sprintf('o.%s LIKE :%s', $property, $parameterName))
-                ->setParameter($parameterName, '%' . $value . '%');
+                ->setParameter($parameterName, '%'.$value.'%');
         }
     }
 
     /**
-     * @param string $resourceClass
      * @return array<string, mixed>
      */
     public function getDescription(string $resourceClass): array

+ 10 - 7
src/Service/Dolibarr/DolibarrApiService.php

@@ -36,10 +36,10 @@ class DolibarrApiService extends ApiRequestService
         // we need to store the organization id in two fields: 2iopen_organization_id and ref_int :(
         try {
             return $this->getJsonContent(
-                "thirdparties" ,
+                'thirdparties',
                 [
                     'limit' => '1',
-                    'sqlfilters' => '(ef.2iopen_organization_id:=:' . $organizationId . ')'
+                    'sqlfilters' => '(ef.2iopen_organization_id:=:'.$organizationId.')',
                 ]
             )[0];
         } catch (HttpException $e) {
@@ -143,10 +143,10 @@ class DolibarrApiService extends ApiRequestService
         // et dolibarr est pas content :(
         try {
             return $this->getJsonContent(
-                'contacts?limit=1000&t.statut=1&thirdparty_ids=' . $socId . '&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)'
+                'contacts?limit=1000&t.statut=1&thirdparty_ids='.$socId.'&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)'
             );
         } catch (HttpException $e) {
-            if ($e->getStatusCode() === 404) {
+            if (404 === $e->getStatusCode()) {
                 // /!\ The dolibarr API will return a 404 error if no results are found...
                 return [];
             }
@@ -155,16 +155,19 @@ class DolibarrApiService extends ApiRequestService
     }
 
     /**
-     * Get the society tags
+     * Get the society tags.
      *
      * @param int $socId The society ID
+     *
      * @return array<int> The array of tags associated with the society
+     *
      * @throws HttpException|\JsonException if an HTTP error occurs
      */
-    public function getSocietyTagsIds(int $socId): array {
+    public function getSocietyTagsIds(int $socId): array
+    {
         try {
             return array_map(
-                function ($x) { return (int)$x['id']; },
+                function ($x) { return (int) $x['id']; },
                 $this->getJsonContent("/thirdparties/$socId/categories")
             );
         } catch (HttpException $e) {

+ 15 - 16
src/Service/Dolibarr/DolibarrSyncService.php

@@ -57,7 +57,7 @@ class DolibarrSyncService
         self::ASSOCIATION_SCHOOL_TAG_ID => 'Association School',
         self::ASSOCIATION_PREMIUM_TAG_ID => 'Association School Premium',
         self::LOCAL_AUTH_SCHOOL_TAG_ID => 'CT School',
-        self::LOCAL_AUTH_PREMIUM_TAG_ID => 'CT School Premium'
+        self::LOCAL_AUTH_PREMIUM_TAG_ID => 'CT School Premium',
     ];
 
     private LoggerInterface $logger;
@@ -136,7 +136,7 @@ class DolibarrSyncService
                 continue;
             }
 
-            $dolibarrSocietyId = (int)$dolibarrSociety['id'];
+            $dolibarrSocietyId = (int) $dolibarrSociety['id'];
 
             // Populate the expected contacts array
             $organizationMembers = $membersIndex[$organization->getId()] ?? [];
@@ -186,7 +186,7 @@ class DolibarrSyncService
                     $this->countWithMission([FunctionEnum::STUDENT->value], $organizationMembers);
             }
             if ($this->organizationUtils->isSchool($organization) || $this->organizationUtils->isArtist($organization)) {
-                $infos[] = $this->translator->trans('ADHERENTS_COUNT') . " : " .
+                $infos[] = $this->translator->trans('ADHERENTS_COUNT').' : '.
                     $this->countWithMission([FunctionEnum::ADHERENT->value], $organizationMembers);
             }
             $infos[] = $this->translator->trans('ADMIN_ACCESS_COUNT').' : '.
@@ -336,8 +336,8 @@ class DolibarrSyncService
 
                 if (!in_array($tagId, $expectedTags)) {
                     $operations[] = new DeleteOperation(
-                        "Delete tag: `" . self::SYNCHRONIZED_TAGS[$tagId] .
-                        '` from ' . $organization->getName() . ' (' . $organization->getId() . ')',
+                        'Delete tag: `'.self::SYNCHRONIZED_TAGS[$tagId].
+                        '` from '.$organization->getName().' ('.$organization->getId().')',
                         "/thirdparties/$dolibarrSocietyId/categories",
                         $tagId
                     );
@@ -348,8 +348,8 @@ class DolibarrSyncService
             foreach ($expectedTags as $tagId) {
                 if (!in_array($tagId, $currentTags)) {
                     $operations[] = new CreateOperation(
-                        "Add tag: `" . self::SYNCHRONIZED_TAGS[$tagId] .
-                        '` to ' . $organization->getName() . ' (' . $organization->getId() . ')',
+                        'Add tag: `'.self::SYNCHRONIZED_TAGS[$tagId].
+                        '` to '.$organization->getName().' ('.$organization->getId().')',
                         "/thirdparties/$dolibarrSocietyId/categories/$tagId",
                         []
                     );
@@ -441,8 +441,8 @@ class DolibarrSyncService
         }
 
         $this->logger->info('Execution ended');
-        $this->logger->info('Done : ' . $done);
-        $this->logger->info('Errors : ' . $errors);
+        $this->logger->info('Done : '.$done);
+        $this->logger->info('Errors : '.$errors);
         if ($unknown > 0) {
             $this->logger->warning('Unknown : '.$unknown);
         }
@@ -783,7 +783,6 @@ class DolibarrSyncService
     }
 
     /**
-     * @param Organization $organization
      * @return array<int>
      */
     protected function getExpectedTagsFor(Organization $organization): array
@@ -792,20 +791,20 @@ class DolibarrSyncService
         $product = $organization->getSettings()->getProduct();
 
         // Association, school or school premium
-        if ($organization->getLegalStatus() === LegalEnum::ASSOCIATION_LAW_1901) {
-            if ($product === SettingsProductEnum::SCHOOL) {
+        if (LegalEnum::ASSOCIATION_LAW_1901 === $organization->getLegalStatus()) {
+            if (SettingsProductEnum::SCHOOL === $product) {
                 $expectedTags[] = self::ASSOCIATION_SCHOOL_TAG_ID;
             }
-            if ($product === SettingsProductEnum::SCHOOL_PREMIUM) {
+            if (SettingsProductEnum::SCHOOL_PREMIUM === $product) {
                 $expectedTags[] = self::ASSOCIATION_PREMIUM_TAG_ID;
             }
         }
         // Local authorities, school or school premium
-        if ($organization->getLegalStatus() === LegalEnum::LOCAL_AUTHORITY) {
-            if ($product === SettingsProductEnum::SCHOOL) {
+        if (LegalEnum::LOCAL_AUTHORITY === $organization->getLegalStatus()) {
+            if (SettingsProductEnum::SCHOOL === $product) {
                 $expectedTags[] = self::LOCAL_AUTH_SCHOOL_TAG_ID;
             }
-            if ($product === SettingsProductEnum::SCHOOL_PREMIUM) {
+            if (SettingsProductEnum::SCHOOL_PREMIUM === $product) {
                 $expectedTags[] = self::LOCAL_AUTH_PREMIUM_TAG_ID;
             }
         }

+ 20 - 18
tests/Unit/Service/Dolibarr/DolibarrApiServiceTest.php

@@ -34,7 +34,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with('thirdparties', [ 'limit' => '1', 'sqlfilters' => '(ef.2iopen_organization_id:=:' . $organizationId . ')'])
+            ->with('thirdparties', ['limit' => '1', 'sqlfilters' => '(ef.2iopen_organization_id:=:'.$organizationId.')'])
             ->willReturn([['id' => 1]]); // dummy non-empty data
 
         $society = $dolibarrApiService->getSociety($organizationId);
@@ -45,7 +45,8 @@ class DolibarrApiServiceTest extends TestCase
     /**
      * @see DolibarrApiService::getSociety()
      */
-    public function testGetSocietyMissing(): void {
+    public function testGetSocietyMissing(): void
+    {
         $dolibarrApiService = $this->getMockBuilder(DolibarrApiService::class)
             ->setConstructorArgs([$this->client])
             ->setMethodsExcept(['getSociety'])
@@ -56,7 +57,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("thirdparties", [ "limit" => "1", "sqlfilters" => "(ef.2iopen_organization_id:=:" . $organizationId . ')'])
+            ->with('thirdparties', ['limit' => '1', 'sqlfilters' => '(ef.2iopen_organization_id:=:'.$organizationId.')'])
             ->willThrowException(new HttpException(404));
 
         $society = $dolibarrApiService->getSociety($organizationId);
@@ -67,7 +68,8 @@ class DolibarrApiServiceTest extends TestCase
     /**
      * @see DolibarrApiService::getSociety()
      */
-    public function testGetSocietyError(): void {
+    public function testGetSocietyError(): void
+    {
         $dolibarrApiService = $this->getMockBuilder(DolibarrApiService::class)
             ->setConstructorArgs([$this->client])
             ->setMethodsExcept(['getSociety'])
@@ -78,7 +80,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("thirdparties", [ "limit" => "1", "sqlfilters" => "(ef.2iopen_organization_id:=:" . $organizationId . ')'])
+            ->with('thirdparties', ['limit' => '1', 'sqlfilters' => '(ef.2iopen_organization_id:=:'.$organizationId.')'])
             ->willThrowException(new HttpException(500));
 
         $this->expectException(HttpException::class);
@@ -101,7 +103,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("contracts", ["limit" => "1", "sqlfilters" => "statut:=:1", "thirdparty_ids" => $socId])
+            ->with('contracts', ['limit' => '1', 'sqlfilters' => 'statut:=:1', 'thirdparty_ids' => $socId])
             ->willReturn([['id' => 1]]); // dummy non-empty data
 
         $this->assertEquals(['id' => 1], $dolibarrApiService->getActiveContract($socId));
@@ -122,7 +124,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("contracts", ["limit" => "1", "sqlfilters" => "statut:=:1", "thirdparty_ids" => $socId])
+            ->with('contracts', ['limit' => '1', 'sqlfilters' => 'statut:=:1', 'thirdparty_ids' => $socId])
             ->willThrowException(new HttpException(404));
 
         $this->assertEquals(null, $dolibarrApiService->getActiveContract($socId));
@@ -143,7 +145,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("contracts", ["limit" => "1", "sqlfilters" => "statut:=:1", "thirdparty_ids" => $socId])
+            ->with('contracts', ['limit' => '1', 'sqlfilters' => 'statut:=:1', 'thirdparty_ids' => $socId])
             ->willThrowException(new HttpException(500));
 
         $this->expectException(HttpException::class);
@@ -166,7 +168,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("invoices", ["sortfield" => "datef", "sortorder" => "DESC", "limit" => 5, "sqlfilters" => "fk_soc:=:" . $socId])
+            ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => 'fk_soc:=:'.$socId])
             ->willReturn([['id' => 10], ['id' => 20]]);
 
         $this->assertEquals([['id' => 10], ['id' => 20]], $dolibarrApiService->getBills($socId));
@@ -187,7 +189,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("invoices", ["sortfield" => "datef", "sortorder" => "DESC", "limit" => 5, "sqlfilters" => "fk_soc:=:" . $socId])
+            ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => 'fk_soc:=:'.$socId])
             ->willThrowException(new HttpException(404));
 
         $this->assertEquals([], $dolibarrApiService->getBills($socId));
@@ -208,7 +210,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("invoices", ["sortfield" => "datef", "sortorder" => "DESC", "limit" => 5, "sqlfilters" => "fk_soc:=:" . $socId])
+            ->with('invoices', ['sortfield' => 'datef', 'sortorder' => 'DESC', 'limit' => 5, 'sqlfilters' => 'fk_soc:=:'.$socId])
             ->willThrowException(new HttpException(500));
 
         $this->expectException(HttpException::class);
@@ -229,7 +231,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("thirdparties", ["limit" => "1000000", "sqlfilters" => "client:=:1"])
+            ->with('thirdparties', ['limit' => '1000000', 'sqlfilters' => 'client:=:1'])
             ->willReturn([['id' => 10], ['id' => 20]]);
 
         $this->assertEquals([['id' => 10], ['id' => 20]], $dolibarrApiService->getAllClients());
@@ -315,7 +317,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("contacts?limit=1000&t.statut=1&thirdparty_ids=" . $socId . "&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)")
+            ->with('contacts?limit=1000&t.statut=1&thirdparty_ids='.$socId.'&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)')
             ->willReturn([['id' => 10], ['id' => 20]]);
 
         $this->assertEquals([['id' => 10], ['id' => 20]], $dolibarrApiService->getActiveOpentalentContacts($socId));
@@ -336,7 +338,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("contacts?limit=1000&t.statut=1&thirdparty_ids=" . $socId . "&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)")
+            ->with('contacts?limit=1000&t.statut=1&thirdparty_ids='.$socId.'&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)')
             ->willThrowException(new HttpException(404));
 
         $this->assertEquals([], $dolibarrApiService->getActiveOpentalentContacts($socId));
@@ -357,7 +359,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("contacts?limit=1000&t.statut=1&thirdparty_ids=" . $socId . "&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)")
+            ->with('contacts?limit=1000&t.statut=1&thirdparty_ids='.$socId.'&sqlfilters:=:(te.2iopen_person_id%3A%3E%3A0)')
             ->willThrowException(new HttpException(500));
 
         $this->expectException(HttpException::class);
@@ -380,7 +382,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("/thirdparties/1/categories")
+            ->with('/thirdparties/1/categories')
             ->willReturn([['id' => '10'], ['id' => '20']]);
 
         $this->assertEquals(
@@ -404,7 +406,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("/thirdparties/1/categories")
+            ->with('/thirdparties/1/categories')
             ->willThrowException(new HttpException(404));
 
         $this->assertEquals(
@@ -428,7 +430,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
             ->expects(self::once())
             ->method('getJsonContent')
-            ->with("/thirdparties/1/categories")
+            ->with('/thirdparties/1/categories')
             ->willThrowException(new HttpException(500));
 
         $this->expectException(HttpException::class);

+ 80 - 25
tests/Unit/Service/Dolibarr/DolibarrSyncServiceTest.php

@@ -44,21 +44,77 @@ use Symfony\Component\HttpClient\Exception\ServerException;
 use Symfony\Contracts\HttpClient\ResponseInterface;
 use Symfony\Contracts\Translation\TranslatorInterface;
 
-class TestableDolibarrSyncService extends DolibarrSyncService {
-    public function getDolibarrSocietiesIndex(): array { return parent::getDolibarrSocietiesIndex(); }
-    public function findDolibarrContactFor(array $dolibarrContacts, Person $person): ?array { return parent::findDolibarrContactFor($dolibarrContacts, $person); }
-    public function getActiveMembersIndex(): array { return parent::getActiveMembersIndex(); }
-    public function sanitizeDolibarrData(?array $data): ?array { return parent::sanitizeDolibarrData($data); }
-    public function getOrganizationPostalAddress(Organization $organization): ?AddressPostal { return parent::getOrganizationPostalAddress($organization); }
-    public function getOrganizationPhone(Organization $organization): ?string { return parent::getOrganizationPhone($organization); }
-    public function getOrganizationEmail(Organization $organization): ?string { return parent::getOrganizationEmail($organization); }
-    public function getOrganizationNetworkId(Organization $organization): ?int { return parent::getOrganizationNetworkId($organization); }
-    public function countWithMission(array $missions, array $members): int { return parent::countWithMission($missions, $members); }
-    public function getPersonContact(Person $person): ?ContactPoint { return parent::getPersonContact($person); }
-    public function formatContactPosition(array $missions, ?string $gender = 'X'): string { return parent::formatContactPosition($missions, $gender); }
-    public function formatPhoneNumber(PhoneNumber $phoneNumber): string { return parent::formatPhoneNumber($phoneNumber); }
-    public function getExpectedTagsFor(Organization $organization): array { return parent::getExpectedTagsFor($organization); }
-    public function validateResponse(ResponseInterface $response, BaseRestOperation $operation): void { parent::validateResponse($response, $operation); }
+class TestableDolibarrSyncService extends DolibarrSyncService
+{
+    public function getDolibarrSocietiesIndex(): array
+    {
+        return parent::getDolibarrSocietiesIndex();
+    }
+
+    public function findDolibarrContactFor(array $dolibarrContacts, Person $person): ?array
+    {
+        return parent::findDolibarrContactFor($dolibarrContacts, $person);
+    }
+
+    public function getActiveMembersIndex(): array
+    {
+        return parent::getActiveMembersIndex();
+    }
+
+    public function sanitizeDolibarrData(?array $data): ?array
+    {
+        return parent::sanitizeDolibarrData($data);
+    }
+
+    public function getOrganizationPostalAddress(Organization $organization): ?AddressPostal
+    {
+        return parent::getOrganizationPostalAddress($organization);
+    }
+
+    public function getOrganizationPhone(Organization $organization): ?string
+    {
+        return parent::getOrganizationPhone($organization);
+    }
+
+    public function getOrganizationEmail(Organization $organization): ?string
+    {
+        return parent::getOrganizationEmail($organization);
+    }
+
+    public function getOrganizationNetworkId(Organization $organization): ?int
+    {
+        return parent::getOrganizationNetworkId($organization);
+    }
+
+    public function countWithMission(array $missions, array $members): int
+    {
+        return parent::countWithMission($missions, $members);
+    }
+
+    public function getPersonContact(Person $person): ?ContactPoint
+    {
+        return parent::getPersonContact($person);
+    }
+
+    public function formatContactPosition(array $missions, ?string $gender = 'X'): string
+    {
+        return parent::formatContactPosition($missions, $gender);
+    }
+
+    public function formatPhoneNumber(PhoneNumber $phoneNumber): string
+    {
+        return parent::formatPhoneNumber($phoneNumber);
+    }
+
+    public function getExpectedTagsFor(Organization $organization): array
+    {
+        return parent::getExpectedTagsFor($organization);
+    }
+
+    public function validateResponse(ResponseInterface $response, BaseRestOperation $operation): void
+    {
+        parent::validateResponse($response, $operation);
+    }
 }
 
 class DolibarrSyncServiceTest extends TestCase
@@ -146,7 +202,7 @@ class DolibarrSyncServiceTest extends TestCase
             'networkId' => NetworkEnum::CMF->value,
             'product' => SettingsProductEnum::SCHOOL,
             'networkId' => NetworkEnum::CMF->value,
-            'legalStatus' => LegalEnum::LOCAL_AUTHORITY
+            'legalStatus' => LegalEnum::LOCAL_AUTHORITY,
         ];
 
         $orgId2 = 20;
@@ -159,7 +215,7 @@ class DolibarrSyncServiceTest extends TestCase
             'phone' => null,
             'networkId' => null,
             'product' => SettingsProductEnum::ARTIST,
-            'legalStatus' => LegalEnum::ASSOCIATION_LAW_1901
+            'legalStatus' => LegalEnum::ASSOCIATION_LAW_1901,
         ];
 
         $orgId3 = 30;
@@ -509,11 +565,11 @@ class DolibarrSyncServiceTest extends TestCase
         // Tags
         $this->dolibarrApiService->method('getSocietyTagsIds')->willReturnMap([
             [$socId1, [1, 68]],
-            [$socId2, [3, 67]]
+            [$socId2, [3, 67]],
         ]);
         $dolibarrSyncService->method('getExpectedTagsFor')->willReturnMap([
             [$organization1, [67]],
-            [$organization2, []]
+            [$organization2, []],
         ]);
 
         // Expected progression callback triggers
@@ -563,21 +619,21 @@ class DolibarrSyncServiceTest extends TestCase
         $this->assertEqualsCanonicalizing(
             [
                 '[PUT contacts/4]',
-                'statut : `1` => `0`'
+                'statut : `1` => `0`',
             ],
             $operations[2]->getChangeLog()
         );
 
         $this->assertEqualsCanonicalizing(
             [
-                '[DELETE /thirdparties/1/categories/68]'
+                '[DELETE /thirdparties/1/categories/68]',
             ],
             $operations[3]->getChangeLog()
         );
 
         $this->assertEqualsCanonicalizing(
             [
-                '[POST /thirdparties/1/categories/67]'
+                '[POST /thirdparties/1/categories/67]',
             ],
             $operations[4]->getChangeLog()
         );
@@ -618,7 +674,7 @@ class DolibarrSyncServiceTest extends TestCase
 
         $this->assertEqualsCanonicalizing(
             [
-                '[DELETE /thirdparties/2/categories/67]'
+                '[DELETE /thirdparties/2/categories/67]',
             ],
             $operations[7]->getChangeLog()
         );
@@ -747,7 +803,7 @@ class DolibarrSyncServiceTest extends TestCase
 
         $this->assertEqualsCanonicalizing([
             1 => [1 => [FunctionEnum::PRESIDENT->value], 2 => [FunctionEnum::STUDENT->value]],
-            2 => [3 => [FunctionEnum::PRESIDENT->value, FunctionEnum::TEACHER->value]]
+            2 => [3 => [FunctionEnum::PRESIDENT->value, FunctionEnum::TEACHER->value]],
         ], $index);
     }
 
@@ -1342,7 +1398,6 @@ class DolibarrSyncServiceTest extends TestCase
             $dolibarrSyncService->getExpectedTagsFor($organization5),
             []
         );
-
     }
 
     /**