diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 8886dea..082f78f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -26,11 +26,6 @@ parameters: count: 1 path: src/PluginClient.php - - - message: "#^Method Http\\\\Client\\\\Common\\\\EmulatedHttpClient\\:\\:sendRequest\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#" - count: 1 - path: src/EmulatedHttpClient.php - # we still support the obsolete RequestFactory for BC but do not require the package anymore - message: "#^Call to method createRequest\\(\\) on an unknown class Http\\\\Message\\\\RequestFactory\\.$#" @@ -51,30 +46,3 @@ parameters: message: "#^Property Http\\\\Client\\\\Common\\\\HttpMethodsClient\\:\\:\\$requestFactory has unknown class Http\\\\Message\\\\RequestFactory as its type\\.$#" count: 1 path: src/HttpMethodsClient.php - - - - message: "#^Anonymous function should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#" - count: 1 - path: src/Plugin/RedirectPlugin.php - - # phpstan is confused by the optional dependencies. we check for existence first - - - message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\RedirectPlugin::guessStreamFactory\\(\\) should return Psr\\\\Http\\\\Message\\\\StreamFactoryInterface\\|null but returns Nyholm\\\\Psr7\\\\Factory\\\\Psr17Factory\\.$#" - count: 1 - path: src/Plugin/RedirectPlugin.php - - # phpstan is confused by the optional dependencies. we check for existence first - - - message: "#^Call to static method streamFor\\(\\) on an unknown class GuzzleHttp\\\\Psr7\\\\Utils\\.$#" - count: 1 - path: src/Plugin/RedirectPlugin.php - - - - message: "#^Method Http\\\\Client\\\\Common\\\\Plugin\\\\RetryPlugin\\:\\:retry\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#" - count: 1 - path: src/Plugin/RetryPlugin.php - - - - message: "#^Method Http\\\\Client\\\\Common\\\\PluginClient\\:\\:sendRequest\\(\\) should return Psr\\\\Http\\\\Message\\\\ResponseInterface but returns mixed\\.$#" - count: 2 - path: src/PluginClient.php diff --git a/src/Deferred.php b/src/Deferred.php index 646f375..cee9b69 100644 --- a/src/Deferred.php +++ b/src/Deferred.php @@ -10,6 +10,8 @@ /** * A deferred allow to return a promise which has not been resolved yet. + * + * @implements Promise */ final class Deferred implements Promise { @@ -52,7 +54,9 @@ public function __construct(callable $waitCallback) } /** - * {@inheritdoc} + * @param callable(ResponseInterface): ResponseInterface|null $onFulfilled + * @param callable(\Throwable): ResponseInterface|null $onRejected + * @return Promise */ public function then(callable $onFulfilled = null, callable $onRejected = null): Promise { @@ -86,9 +90,6 @@ public function then(callable $onFulfilled = null, callable $onRejected = null): return $deferred; } - /** - * {@inheritdoc} - */ public function getState(): string { return $this->state; @@ -96,6 +97,7 @@ public function getState(): string /** * Resolve this deferred with a Response. + * @param ResponseInterface $response */ public function resolve(ResponseInterface $response): void { @@ -129,8 +131,8 @@ public function reject(ClientExceptionInterface $exception): void } /** - * {@inheritdoc} - */ + * {@inheritDoc} + */ public function wait($unwrap = true) { if (Promise::PENDING === $this->state) { diff --git a/src/HttpAsyncClientDecorator.php b/src/HttpAsyncClientDecorator.php index 2714b4a..92cf2c9 100644 --- a/src/HttpAsyncClientDecorator.php +++ b/src/HttpAsyncClientDecorator.php @@ -5,6 +5,8 @@ namespace Http\Client\Common; use Http\Client\HttpAsyncClient; +use Http\Promise\Promise; +use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\RequestInterface; /** @@ -20,9 +22,8 @@ trait HttpAsyncClientDecorator protected $httpAsyncClient; /** - * {@inheritdoc} - * * @see HttpAsyncClient::sendAsyncRequest + * @return Promise */ public function sendAsyncRequest(RequestInterface $request) { diff --git a/src/HttpAsyncClientEmulator.php b/src/HttpAsyncClientEmulator.php index 53c2535..9667e3c 100644 --- a/src/HttpAsyncClientEmulator.php +++ b/src/HttpAsyncClientEmulator.php @@ -17,16 +17,13 @@ trait HttpAsyncClientEmulator { /** - * {@inheritdoc} - * * @see HttpClient::sendRequest */ abstract public function sendRequest(RequestInterface $request): ResponseInterface; /** - * {@inheritdoc} - * * @see HttpAsyncClient::sendAsyncRequest + * @return \Http\Promise\Promise */ public function sendAsyncRequest(RequestInterface $request) { diff --git a/src/HttpClientDecorator.php b/src/HttpClientDecorator.php index c00ba6f..d236ad5 100644 --- a/src/HttpClientDecorator.php +++ b/src/HttpClientDecorator.php @@ -21,8 +21,6 @@ trait HttpClientDecorator protected $httpClient; /** - * {@inheritdoc} - * * @see ClientInterface::sendRequest */ public function sendRequest(RequestInterface $request): ResponseInterface diff --git a/src/HttpClientEmulator.php b/src/HttpClientEmulator.php index 51e2c05..7c40b50 100644 --- a/src/HttpClientEmulator.php +++ b/src/HttpClientEmulator.php @@ -15,8 +15,6 @@ trait HttpClientEmulator { /** - * {@inheritdoc} - * * @see HttpClient::sendRequest */ public function sendRequest(RequestInterface $request): ResponseInterface @@ -27,8 +25,6 @@ public function sendRequest(RequestInterface $request): ResponseInterface } /** - * {@inheritdoc} - * * @see HttpAsyncClient::sendAsyncRequest */ abstract public function sendAsyncRequest(RequestInterface $request); diff --git a/src/HttpClientPool/HttpClientPool.php b/src/HttpClientPool/HttpClientPool.php index a30bdb0..5166e6e 100644 --- a/src/HttpClientPool/HttpClientPool.php +++ b/src/HttpClientPool/HttpClientPool.php @@ -7,6 +7,7 @@ use Http\Client\Common\Exception\HttpClientNotFoundException; use Http\Client\Common\HttpClientPool as HttpClientPoolInterface; use Http\Client\HttpAsyncClient; +use Http\Promise\Promise; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; @@ -53,16 +54,13 @@ public function addHttpClient($client): void abstract protected function chooseHttpClient(): HttpClientPoolItem; /** - * {@inheritdoc} + * @return Promise */ public function sendAsyncRequest(RequestInterface $request) { return $this->chooseHttpClient()->sendAsyncRequest($request); } - /** - * {@inheritdoc} - */ public function sendRequest(RequestInterface $request): ResponseInterface { return $this->chooseHttpClient()->sendRequest($request); diff --git a/src/HttpClientPool/HttpClientPoolItem.php b/src/HttpClientPool/HttpClientPoolItem.php index f29d065..0f2b03d 100644 --- a/src/HttpClientPool/HttpClientPoolItem.php +++ b/src/HttpClientPool/HttpClientPoolItem.php @@ -8,6 +8,7 @@ use Http\Client\Exception; use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; +use Http\Promise\Promise; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; @@ -69,9 +70,6 @@ public function __construct($client, int $reenableAfter = null) $this->reenableAfter = $reenableAfter; } - /** - * {@inheritdoc} - */ public function sendRequest(RequestInterface $request): ResponseInterface { if ($this->isDisabled()) { @@ -93,7 +91,7 @@ public function sendRequest(RequestInterface $request): ResponseInterface } /** - * {@inheritdoc} + * @return Promise */ public function sendAsyncRequest(RequestInterface $request) { diff --git a/src/HttpClientPool/LeastUsedClientPool.php b/src/HttpClientPool/LeastUsedClientPool.php index 789c357..bfa1cd0 100644 --- a/src/HttpClientPool/LeastUsedClientPool.php +++ b/src/HttpClientPool/LeastUsedClientPool.php @@ -15,9 +15,6 @@ */ final class LeastUsedClientPool extends HttpClientPool { - /** - * {@inheritdoc} - */ protected function chooseHttpClient(): HttpClientPoolItem { $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) { diff --git a/src/HttpClientPool/RandomClientPool.php b/src/HttpClientPool/RandomClientPool.php index 789ba42..8fda587 100644 --- a/src/HttpClientPool/RandomClientPool.php +++ b/src/HttpClientPool/RandomClientPool.php @@ -13,9 +13,6 @@ */ final class RandomClientPool extends HttpClientPool { - /** - * {@inheritdoc} - */ protected function chooseHttpClient(): HttpClientPoolItem { $clientPool = array_filter($this->clientPool, function (HttpClientPoolItem $clientPoolItem) { diff --git a/src/HttpClientPool/RoundRobinClientPool.php b/src/HttpClientPool/RoundRobinClientPool.php index 7c7b191..a908653 100644 --- a/src/HttpClientPool/RoundRobinClientPool.php +++ b/src/HttpClientPool/RoundRobinClientPool.php @@ -13,9 +13,6 @@ */ final class RoundRobinClientPool extends HttpClientPool { - /** - * {@inheritdoc} - */ protected function chooseHttpClient(): HttpClientPoolItem { $last = current($this->clientPool); diff --git a/src/HttpClientRouter.php b/src/HttpClientRouter.php index 040d893..83fe9df 100644 --- a/src/HttpClientRouter.php +++ b/src/HttpClientRouter.php @@ -7,13 +7,12 @@ use Http\Client\Common\Exception\HttpClientNoMatchException; use Http\Client\HttpAsyncClient; use Http\Message\RequestMatcher; +use Http\Promise\Promise; use Psr\Http\Client\ClientInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; /** - * {@inheritdoc} - * * @author Joel Wurtz */ final class HttpClientRouter implements HttpClientRouterInterface @@ -23,16 +22,13 @@ final class HttpClientRouter implements HttpClientRouterInterface */ private $clients = []; - /** - * {@inheritdoc} - */ public function sendRequest(RequestInterface $request): ResponseInterface { return $this->chooseHttpClient($request)->sendRequest($request); } /** - * {@inheritdoc} + * @return Promise */ public function sendAsyncRequest(RequestInterface $request) { diff --git a/src/Plugin.php b/src/Plugin.php index 99898b9..82b30ab 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -5,6 +5,7 @@ namespace Http\Client\Common; use Http\Promise\Promise; +use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\RequestInterface; /** @@ -24,10 +25,10 @@ interface Plugin * * @see http://docs.php-http.org/en/latest/plugins/build-your-own.html * - * @param callable(RequestInterface): Promise $next Next middleware in the chain, the request is passed as the first argument - * @param callable(RequestInterface): Promise $first First middleware in the chain, used to to restart a request + * @param callable(RequestInterface): Promise $next Next middleware in the chain, the request is passed as the first argument + * @param callable(RequestInterface): Promise $first First middleware in the chain, used to to restart a request * - * @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient) + * @return Promise Resolves a PSR-7 Response or fails with an Http\Client\Exception (The same as HttpAsyncClient) */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise; } diff --git a/src/Plugin/AddHostPlugin.php b/src/Plugin/AddHostPlugin.php index 2a866ee..ca811b7 100644 --- a/src/Plugin/AddHostPlugin.php +++ b/src/Plugin/AddHostPlugin.php @@ -48,9 +48,6 @@ public function __construct(UriInterface $host, array $config = []) $this->replace = $options['replace']; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { if ($this->replace || '' === $request->getUri()->getHost()) { diff --git a/src/Plugin/AuthenticationPlugin.php b/src/Plugin/AuthenticationPlugin.php index ce9d4bd..2336062 100644 --- a/src/Plugin/AuthenticationPlugin.php +++ b/src/Plugin/AuthenticationPlugin.php @@ -26,9 +26,6 @@ public function __construct(Authentication $authentication) $this->authentication = $authentication; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $request = $this->authentication->authenticate($request); diff --git a/src/Plugin/BaseUriPlugin.php b/src/Plugin/BaseUriPlugin.php index 34c3b64..c361683 100644 --- a/src/Plugin/BaseUriPlugin.php +++ b/src/Plugin/BaseUriPlugin.php @@ -24,7 +24,7 @@ final class BaseUriPlugin implements Plugin /** * @var AddPathPlugin|null */ - private $addPathPlugin = null; + private $addPathPlugin; /** * @param UriInterface $uri Has to contain a host name and can have a path @@ -39,9 +39,6 @@ public function __construct(UriInterface $uri, array $hostConfig = []) } } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $addHostNext = function (RequestInterface $request) use ($next, $first) { diff --git a/src/Plugin/ContentLengthPlugin.php b/src/Plugin/ContentLengthPlugin.php index f313c33..ad69ff3 100644 --- a/src/Plugin/ContentLengthPlugin.php +++ b/src/Plugin/ContentLengthPlugin.php @@ -16,9 +16,6 @@ */ final class ContentLengthPlugin implements Plugin { - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { if (!$request->hasHeader('Content-Length')) { diff --git a/src/Plugin/ContentTypePlugin.php b/src/Plugin/ContentTypePlugin.php index da3758e..e4844c4 100644 --- a/src/Plugin/ContentTypePlugin.php +++ b/src/Plugin/ContentTypePlugin.php @@ -57,9 +57,6 @@ public function __construct(array $config = []) $this->sizeLimit = $options['size_limit']; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { if (!$request->hasHeader('Content-Type')) { diff --git a/src/Plugin/CookiePlugin.php b/src/Plugin/CookiePlugin.php index aa4d5d7..6a8942a 100644 --- a/src/Plugin/CookiePlugin.php +++ b/src/Plugin/CookiePlugin.php @@ -33,9 +33,6 @@ public function __construct(CookieJar $cookieJar) $this->cookieJar = $cookieJar; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $cookies = []; diff --git a/src/Plugin/DecoderPlugin.php b/src/Plugin/DecoderPlugin.php index 41c1a58..3e781aa 100644 --- a/src/Plugin/DecoderPlugin.php +++ b/src/Plugin/DecoderPlugin.php @@ -48,9 +48,6 @@ public function __construct(array $config = []) $this->useContentEncoding = $options['use_content_encoding']; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $encodings = extension_loaded('zlib') ? ['gzip', 'deflate'] : ['identity']; diff --git a/src/Plugin/ErrorPlugin.php b/src/Plugin/ErrorPlugin.php index 678977f..712e28a 100644 --- a/src/Plugin/ErrorPlugin.php +++ b/src/Plugin/ErrorPlugin.php @@ -54,9 +54,6 @@ public function __construct(array $config = []) $this->onlyServerException = $options['only_server_exception']; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $promise = $next($request); diff --git a/src/Plugin/HeaderAppendPlugin.php b/src/Plugin/HeaderAppendPlugin.php index 95ea673..e6d6235 100644 --- a/src/Plugin/HeaderAppendPlugin.php +++ b/src/Plugin/HeaderAppendPlugin.php @@ -34,9 +34,6 @@ public function __construct(array $headers) $this->headers = $headers; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { foreach ($this->headers as $header => $headerValue) { diff --git a/src/Plugin/HeaderDefaultsPlugin.php b/src/Plugin/HeaderDefaultsPlugin.php index bf58070..baf8f9d 100644 --- a/src/Plugin/HeaderDefaultsPlugin.php +++ b/src/Plugin/HeaderDefaultsPlugin.php @@ -30,9 +30,6 @@ public function __construct(array $headers) $this->headers = $headers; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { foreach ($this->headers as $header => $headerValue) { diff --git a/src/Plugin/HeaderRemovePlugin.php b/src/Plugin/HeaderRemovePlugin.php index 9f4ca44..abfb922 100644 --- a/src/Plugin/HeaderRemovePlugin.php +++ b/src/Plugin/HeaderRemovePlugin.php @@ -28,9 +28,6 @@ public function __construct(array $headers) $this->headers = $headers; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { foreach ($this->headers as $header) { diff --git a/src/Plugin/HeaderSetPlugin.php b/src/Plugin/HeaderSetPlugin.php index 06f00eb..1ca9fb3 100644 --- a/src/Plugin/HeaderSetPlugin.php +++ b/src/Plugin/HeaderSetPlugin.php @@ -30,9 +30,6 @@ public function __construct(array $headers) $this->headers = $headers; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { foreach ($this->headers as $header => $headerValue) { diff --git a/src/Plugin/HistoryPlugin.php b/src/Plugin/HistoryPlugin.php index a1796a6..15597ee 100644 --- a/src/Plugin/HistoryPlugin.php +++ b/src/Plugin/HistoryPlugin.php @@ -29,9 +29,6 @@ public function __construct(Journal $journal) $this->journal = $journal; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $journal = $this->journal; diff --git a/src/Plugin/QueryDefaultsPlugin.php b/src/Plugin/QueryDefaultsPlugin.php index 4c8087c..fc11ba1 100644 --- a/src/Plugin/QueryDefaultsPlugin.php +++ b/src/Plugin/QueryDefaultsPlugin.php @@ -31,9 +31,6 @@ public function __construct(array $queryParams) $this->queryParams = $queryParams; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $uri = $request->getUri(); diff --git a/src/Plugin/RedirectPlugin.php b/src/Plugin/RedirectPlugin.php index ee5c232..beb633e 100644 --- a/src/Plugin/RedirectPlugin.php +++ b/src/Plugin/RedirectPlugin.php @@ -158,9 +158,6 @@ public function __construct(array $config = []) $this->streamFactory = $options['stream_factory']; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { // Check in storage diff --git a/src/Plugin/RequestMatcherPlugin.php b/src/Plugin/RequestMatcherPlugin.php index 45d4375..8373409 100644 --- a/src/Plugin/RequestMatcherPlugin.php +++ b/src/Plugin/RequestMatcherPlugin.php @@ -38,9 +38,6 @@ public function __construct(RequestMatcher $requestMatcher, ?Plugin $delegateOnM $this->failurePlugin = $delegateOnNoMatch; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { if ($this->requestMatcher->matches($request)) { diff --git a/src/Plugin/RequestSeekableBodyPlugin.php b/src/Plugin/RequestSeekableBodyPlugin.php index 1b6c528..f39c88d 100644 --- a/src/Plugin/RequestSeekableBodyPlugin.php +++ b/src/Plugin/RequestSeekableBodyPlugin.php @@ -15,9 +15,6 @@ */ final class RequestSeekableBodyPlugin extends SeekableBodyPlugin { - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { if (!$request->getBody()->isSeekable()) { diff --git a/src/Plugin/ResponseSeekableBodyPlugin.php b/src/Plugin/ResponseSeekableBodyPlugin.php index 6f941b6..ef8bee4 100644 --- a/src/Plugin/ResponseSeekableBodyPlugin.php +++ b/src/Plugin/ResponseSeekableBodyPlugin.php @@ -16,9 +16,6 @@ */ final class ResponseSeekableBodyPlugin extends SeekableBodyPlugin { - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { return $next($request)->then(function (ResponseInterface $response) { diff --git a/src/Plugin/RetryPlugin.php b/src/Plugin/RetryPlugin.php index 144679e..992bb21 100644 --- a/src/Plugin/RetryPlugin.php +++ b/src/Plugin/RetryPlugin.php @@ -96,9 +96,6 @@ public function __construct(array $config = []) $this->exceptionDelay = $options['exception_delay']; } - /** - * {@inheritdoc} - */ public function handleRequest(RequestInterface $request, callable $next, callable $first): Promise { $chainIdentifier = spl_object_hash((object) $first); diff --git a/src/PluginChain.php b/src/PluginChain.php index 2bfbfbc..ddf85cb 100644 --- a/src/PluginChain.php +++ b/src/PluginChain.php @@ -7,13 +7,14 @@ use Http\Client\Common\Exception\LoopException; use Http\Promise\Promise; use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; final class PluginChain { /** @var Plugin[] */ private $plugins; - /** @var callable(RequestInterface): Promise */ + /** @var callable(RequestInterface): Promise */ private $clientCallable; /** @var int */ @@ -24,7 +25,7 @@ final class PluginChain /** * @param Plugin[] $plugins A plugin chain - * @param callable(RequestInterface): Promise $clientCallable Callable making the HTTP call + * @param callable(RequestInterface): Promise $clientCallable Callable making the HTTP call * @param array{'max_restarts'?: int} $options */ public function __construct(array $plugins, callable $clientCallable, array $options = []) @@ -48,6 +49,9 @@ private function createChain(): callable return $lastCallable; } + /** + * @return Promise + */ public function __invoke(RequestInterface $request): Promise { if ($this->restarts > $this->maxRestarts) { diff --git a/src/PluginClient.php b/src/PluginClient.php index db81243..7f7a58e 100644 --- a/src/PluginClient.php +++ b/src/PluginClient.php @@ -64,9 +64,6 @@ public function __construct($client, array $plugins = [], array $options = []) $this->options = $this->configure($options); } - /** - * {@inheritdoc} - */ public function sendRequest(RequestInterface $request): ResponseInterface { // If the client doesn't support sync calls, call async @@ -88,7 +85,7 @@ public function sendRequest(RequestInterface $request): ResponseInterface } /** - * {@inheritdoc} + * @return Promise */ public function sendAsyncRequest(RequestInterface $request) { @@ -120,7 +117,7 @@ private function configure(array $options = []): array * @param Plugin[] $plugins A plugin chain * @param callable $clientCallable Callable making the HTTP call * - * @return callable(RequestInterface): Promise + * @return callable(RequestInterface): Promise */ private function createPluginChain(array $plugins, callable $clientCallable): callable { diff --git a/src/PluginClientBuilder.php b/src/PluginClientBuilder.php index 8746498..45fd787 100644 --- a/src/PluginClientBuilder.php +++ b/src/PluginClientBuilder.php @@ -31,7 +31,7 @@ public function addPlugin(Plugin $plugin, int $priority = 0): self } /** - * @param mixed $value + * @param string|int|float|bool|string[] $value */ public function setOption(string $name, $value): self {