diff --git a/lib/Adapter/Elastica/ElasticaAdapter.php b/lib/Adapter/Elastica/ElasticaAdapter.php index 60e467e7..9fed08bb 100644 --- a/lib/Adapter/Elastica/ElasticaAdapter.php +++ b/lib/Adapter/Elastica/ElasticaAdapter.php @@ -3,6 +3,7 @@ namespace Pagerfanta\Elastica; use Elastica\Query; +use Elastica\Result; use Elastica\ResultSet; use Elastica\SearchableInterface; use Pagerfanta\Adapter\AdapterInterface; @@ -11,9 +12,7 @@ /** * Adapter which calculates pagination from an Elastica Query. * - * @template T - * - * @implements AdapterInterface + * @implements AdapterInterface */ class ElasticaAdapter implements AdapterInterface { @@ -70,7 +69,7 @@ public function getNbResults(): int * @param int<0, max> $offset * @param int<0, max> $length * - * @return iterable + * @return iterable */ public function getSlice(int $offset, int $length): iterable { diff --git a/lib/Adapter/Elastica/Tests/ElasticaAdapterTest.php b/lib/Adapter/Elastica/Tests/ElasticaAdapterTest.php index 84dfd43f..725a646b 100644 --- a/lib/Adapter/Elastica/Tests/ElasticaAdapterTest.php +++ b/lib/Adapter/Elastica/Tests/ElasticaAdapterTest.php @@ -23,9 +23,6 @@ final class ElasticaAdapterTest extends TestCase */ private array $options; - /** - * @var ElasticaAdapter - */ private ElasticaAdapter $adapter; protected function setUp(): void diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9f6d51d0..5812ac58 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -78,12 +78,6 @@ parameters: count: 2 path: lib/Adapter/Elastica/ElasticaAdapter.php - - - message: '#^Method Pagerfanta\\Elastica\\ElasticaAdapter\:\:getSlice\(\) should return iterable\<\(int\|string\), T\> but returns Elastica\\ResultSet\.$#' - identifier: return.type - count: 1 - path: lib/Adapter/Elastica/ElasticaAdapter.php - - message: '#^Method Pagerfanta\\Solarium\\SolariumAdapter\:\:getNbResults\(\) should return int\<0, max\> but returns int\|null\.$#' identifier: return.type