Improve type declarations and add PHPDoc for ThirdPartySearch and ThirdPartyRepository

This commit is contained in:
2025-12-22 14:25:55 +01:00
parent ed3fd429a4
commit 1b5c3dfc33
2 changed files with 4 additions and 5 deletions

View File

@@ -19,6 +19,9 @@ use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ObjectRepository;
/**
* @implements ObjectRepository<ThirdParty>
*/
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
{

View File

@@ -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(