diff --git a/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php b/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php index 6c0014a2d..4eecb09b4 100644 --- a/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php +++ b/src/Bundle/ChillThirdPartyBundle/Service/ThirdpartyMergeService.php @@ -12,13 +12,18 @@ declare(strict_types=1); namespace Chill\ThirdPartyBundle\Service; use Chill\ThirdPartyBundle\Entity\ThirdParty; +use Doctrine\DBAL\Exception; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Mapping\ClassMetadata; +use Doctrine\ORM\Mapping\MappingException; -class ThirdpartyMergeService +readonly class ThirdpartyMergeService { - public function __construct(private readonly EntityManagerInterface $em) {} + public function __construct(private EntityManagerInterface $em) {} + /** + * @throws Exception + */ public function merge(ThirdParty $toKeep, ThirdParty $toDelete): void { $conn = $this->em->getConnection(); @@ -41,6 +46,9 @@ class ThirdpartyMergeService } } + /** + * @throws MappingException + */ private function updateReferences(ThirdParty $toKeep, ThirdParty $toDelete): array { $queries = []; diff --git a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml index af184a7de..2c5e8f262 100644 --- a/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillThirdPartyBundle/translations/messages.fr.yml @@ -134,9 +134,6 @@ is thirdparty: Le demandeur est un tiers Filter by person's who have a residential address located at a thirdparty of type: Filtrer les usagers qui ont une addresse de résidence chez un tiers "Filtered by person's who have a residential address located at a thirdparty of type %thirdparty_type% and valid on %date_calc%": "Uniquement les usagers qui ont une addresse de résidence chez un tiers de catégorie %thirdparty_type% et valide sur la date %date_calc%" -find duplicate thirdparty: 'Désigner un tier doublon' -find duplicate thirdparty: 'Désigner un tier doublon' - # admin admin: @@ -158,7 +155,6 @@ Contact email: Courrier électronique du contact Contact address: Adresse du contact Contact profession: Profession du contact -find_thirdparty_duplicate: 'Désigner un tiers doublon' thirdparty_duplicate: title: Fusionner les tiers doublons find: Désigner un tiers doublon