From 1b5c3dfc333cf07f1c08e4b9488246a07268b253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 22 Dec 2025 14:25:55 +0100 Subject: [PATCH] Improve type declarations and add PHPDoc for `ThirdPartySearch` and `ThirdPartyRepository` --- .../Repository/ThirdPartyRepository.php | 7 +++---- .../ChillThirdPartyBundle/Search/ThirdPartySearch.php | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php index 89aaf2c61..2a4fb0902 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php @@ -19,6 +19,9 @@ use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ObjectRepository; +/** + * @implements ObjectRepository + */ class ThirdPartyRepository implements ObjectRepository { private readonly EntityRepository $repository; @@ -103,9 +106,6 @@ class ThirdPartyRepository implements ObjectRepository return $this->repository->find($id); } - /** - * @return array|ThirdParty[] - */ public function findAll(): array { return $this->repository->findAll(); @@ -115,7 +115,6 @@ class ThirdPartyRepository implements ObjectRepository * @param null $limit * @param null $offset * - * @return array|ThirdParty[] */ public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { diff --git a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php index a3a3086a9..94db3eb09 100644 --- a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php +++ b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartySearch.php @@ -69,7 +69,7 @@ class ThirdPartySearch implements SearchInterface return false; } - public function renderResult(array $terms, $start = 0, $limit = 50, $options = [], $format = 'html') + public function renderResult(array $terms, $start = 0, $limit = 50, $options = [], $format = 'html'): array { $centers = $this->authorizationHelper ->getReachableCenters(