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
This commit is contained in:
Zebulan Stanphill 2021-08-18 15:53:35 -05:00 committed by David Garcia
parent fe6a21e1d2
commit 6f678bf09e
6 changed files with 8 additions and 8 deletions

View File

@ -48,7 +48,7 @@ abstract class HttpApi
{ {
if (!is_a($httpClient, ClientInterface::class) && if (!is_a($httpClient, ClientInterface::class) &&
!is_a($httpClient, PluginClient::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'); Psr\Http\Client\ClientInterface or Http\Client\Common\PluginClient');
} }
$this->httpClient = $httpClient; $this->httpClient = $httpClient;
@ -59,7 +59,7 @@ abstract class HttpApi
} }
/** /**
* @phpstan-param class-string $class * @param class-string $class
* *
* @return mixed|ResponseInterface * @return mixed|ResponseInterface
* *

View File

@ -23,7 +23,7 @@ trait Pagination
abstract protected function httpGet(string $path, array $parameters = [], array $requestHeaders = []): ResponseInterface; 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); 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 private function getPaginationUrl(string $url, string $class): ?PagingProvider
{ {

View File

@ -22,7 +22,7 @@ use Psr\Http\Message\ResponseInterface;
final class ArrayHydrator implements Hydrator final class ArrayHydrator implements Hydrator
{ {
/** /**
* @phpstan-param class-string $class * @param class-string $class
* *
* @return array * @return array
*/ */

View File

@ -20,7 +20,7 @@ use Psr\Http\Message\ResponseInterface;
interface Hydrator interface Hydrator
{ {
/** /**
* @phpstan-param class-string $class * @param class-string $class
* *
* @throws HydrationException * @throws HydrationException
*/ */

View File

@ -23,7 +23,7 @@ use Psr\Http\Message\ResponseInterface;
final class ModelHydrator implements Hydrator final class ModelHydrator implements Hydrator
{ {
/** /**
* @phpstan-param class-string $class * @param class-string $class
* *
* @return ResponseInterface * @return ResponseInterface
*/ */

View File

@ -21,7 +21,7 @@ use Psr\Http\Message\ResponseInterface;
final class NoopHydrator implements Hydrator final class NoopHydrator implements Hydrator
{ {
/** /**
* @phpstan-param class-string $class * @param class-string $class
* *
* @throws \LogicException * @throws \LogicException
*/ */