From 6f678bf09e0e4ee7457b4a401e71b7ffb6753be4 Mon Sep 17 00:00:00 2001 From: Zebulan Stanphill Date: Wed, 18 Aug 2021 15:53:35 -0500 Subject: [PATCH] Use @param instead of @phpstan-param since it works with Psalm as well. See discussion here: https://github.com/mailgun/mailgun-php/pull/771#issuecomment-901337117 --- src/Api/HttpApi.php | 4 ++-- src/Api/Pagination.php | 4 ++-- src/Hydrator/ArrayHydrator.php | 2 +- src/Hydrator/Hydrator.php | 2 +- src/Hydrator/ModelHydrator.php | 2 +- src/Hydrator/NoopHydrator.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Api/HttpApi.php b/src/Api/HttpApi.php index 5ce5c1f..884deb7 100644 --- a/src/Api/HttpApi.php +++ b/src/Api/HttpApi.php @@ -48,7 +48,7 @@ abstract class HttpApi { if (!is_a($httpClient, ClientInterface::class) && !is_a($httpClient, PluginClient::class)) { - throw new \RuntimeException('httpClient must be an instance of + throw new \RuntimeException('httpClient must be an instance of Psr\Http\Client\ClientInterface or Http\Client\Common\PluginClient'); } $this->httpClient = $httpClient; @@ -59,7 +59,7 @@ abstract class HttpApi } /** - * @phpstan-param class-string $class + * @param class-string $class * * @return mixed|ResponseInterface * diff --git a/src/Api/Pagination.php b/src/Api/Pagination.php index 3130854..1ec3e0f 100644 --- a/src/Api/Pagination.php +++ b/src/Api/Pagination.php @@ -23,7 +23,7 @@ trait Pagination abstract protected function httpGet(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface; /** - * @phpstan-param class-string $className + * @param class-string $className */ abstract protected function hydrateResponse(ResponseInterface $response, string $className); @@ -48,7 +48,7 @@ trait Pagination } /** - * @phpstan-param class-string $class + * @param class-string $class */ private function getPaginationUrl(string $url, string $class): ?PagingProvider { diff --git a/src/Hydrator/ArrayHydrator.php b/src/Hydrator/ArrayHydrator.php index 9c49601..806b7d9 100644 --- a/src/Hydrator/ArrayHydrator.php +++ b/src/Hydrator/ArrayHydrator.php @@ -22,7 +22,7 @@ use Psr\Http\Message\ResponseInterface; final class ArrayHydrator implements Hydrator { /** - * @phpstan-param class-string $class + * @param class-string $class * * @return array */ diff --git a/src/Hydrator/Hydrator.php b/src/Hydrator/Hydrator.php index f6df687..05b7156 100644 --- a/src/Hydrator/Hydrator.php +++ b/src/Hydrator/Hydrator.php @@ -20,7 +20,7 @@ use Psr\Http\Message\ResponseInterface; interface Hydrator { /** - * @phpstan-param class-string $class + * @param class-string $class * * @throws HydrationException */ diff --git a/src/Hydrator/ModelHydrator.php b/src/Hydrator/ModelHydrator.php index d54224b..d58cca0 100644 --- a/src/Hydrator/ModelHydrator.php +++ b/src/Hydrator/ModelHydrator.php @@ -23,7 +23,7 @@ use Psr\Http\Message\ResponseInterface; final class ModelHydrator implements Hydrator { /** - * @phpstan-param class-string $class + * @param class-string $class * * @return ResponseInterface */ diff --git a/src/Hydrator/NoopHydrator.php b/src/Hydrator/NoopHydrator.php index ae5f030..869ef6f 100644 --- a/src/Hydrator/NoopHydrator.php +++ b/src/Hydrator/NoopHydrator.php @@ -21,7 +21,7 @@ use Psr\Http\Message\ResponseInterface; final class NoopHydrator implements Hydrator { /** - * @phpstan-param class-string $class + * @param class-string $class * * @throws \LogicException */