From 5c7eaf7c4a61aca2fca897d6ac655c12c9e06b44 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Fri, 13 Dec 2024 12:46:56 +0100 Subject: [PATCH] Define the proper type for the SolariumAdapter This adapter is always working with Solarium's DocumentInterface so it does not need to be generic. --- lib/Adapter/Solarium/SolariumAdapter.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/Adapter/Solarium/SolariumAdapter.php b/lib/Adapter/Solarium/SolariumAdapter.php index 4d1915de..6d717b1c 100644 --- a/lib/Adapter/Solarium/SolariumAdapter.php +++ b/lib/Adapter/Solarium/SolariumAdapter.php @@ -5,15 +5,14 @@ use Pagerfanta\Adapter\AdapterInterface; use Solarium\Core\Client\ClientInterface; use Solarium\Core\Client\Endpoint; +use Solarium\Core\Query\DocumentInterface; use Solarium\QueryType\Select\Query\Query; use Solarium\QueryType\Select\Result\Result; /** * Adapter which calculates pagination from a Solarium Query. * - * @template T - * - * @implements AdapterInterface + * @implements AdapterInterface */ class SolariumAdapter implements AdapterInterface { @@ -44,12 +43,6 @@ public function getNbResults(): int return $this->getResultSet()->getNumFound(); } - /** - * @param int<0, max> $offset - * @param int<0, max> $length - * - * @return iterable - */ public function getSlice(int $offset, int $length): iterable { return $this->getResultSet($offset, $length);