diff --git a/src/Api/HttpApi.php b/src/Api/HttpApi.php index bb566df..5ce5c1f 100644 --- a/src/Api/HttpApi.php +++ b/src/Api/HttpApi.php @@ -59,6 +59,8 @@ abstract class HttpApi } /** + * @phpstan-param class-string $class + * * @return mixed|ResponseInterface * * @throws \Exception diff --git a/src/Api/Pagination.php b/src/Api/Pagination.php index 2395517..3130854 100644 --- a/src/Api/Pagination.php +++ b/src/Api/Pagination.php @@ -22,6 +22,9 @@ trait Pagination { abstract protected function httpGet(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface; + /** + * @phpstan-param class-string $className + */ abstract protected function hydrateResponse(ResponseInterface $response, string $className); public function nextPage(PagingProvider $response): ?PagingProvider @@ -44,6 +47,9 @@ trait Pagination return $this->getPaginationUrl($response->getLastUrl(), get_class($response)); } + /** + * @phpstan-param class-string $class + */ private function getPaginationUrl(string $url, string $class): ?PagingProvider { Assert::stringNotEmpty($class);