Skip to content

Commit

Permalink
Define the proper type for the SolariumAdapter (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
stof authored Dec 13, 2024
1 parent be8c26a commit 57b114f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/Adapter/Solarium/SolariumAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>
* @implements AdapterInterface<DocumentInterface>
*/
class SolariumAdapter implements AdapterInterface
{
Expand Down Expand Up @@ -44,12 +43,6 @@ public function getNbResults(): int
return $this->getResultSet()->getNumFound();
}

/**
* @param int<0, max> $offset
* @param int<0, max> $length
*
* @return iterable<array-key, T>
*/
public function getSlice(int $offset, int $length): iterable
{
return $this->getResultSet($offset, $length);
Expand Down

0 comments on commit 57b114f

Please sign in to comment.