From 0cba3a2285621b1a0f6160d7ba77ab6658d0de0a Mon Sep 17 00:00:00 2001 From: ahmard Date: Fri, 30 Dec 2022 03:41:37 +0100 Subject: [PATCH] fix: typing --- src/Client.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Client.php b/src/Client.php index 8306971..0d2490f 100644 --- a/src/Client.php +++ b/src/Client.php @@ -18,10 +18,10 @@ class Client * @return PromiseInterface */ public function execute( - string $requestMethod, - string $url, - array $headers = [], - $body = '' + string $requestMethod, + string $url, + array $headers = [], + ReadableStreamInterface|string $body = '' ): PromiseInterface { return $this->prepareQueryable( @@ -70,7 +70,7 @@ public static function get(string $url, array $headers = []): PromiseInterface * @param ReadableStreamInterface|string $body * @return PromiseInterface */ - public static function post(string $url, array $headers = [], $body = ''): PromiseInterface + public static function post(string $url, array $headers = [], ReadableStreamInterface|string $body = ''): PromiseInterface { return (new static())->execute('POST', $url, $headers, $body); } @@ -95,7 +95,7 @@ public static function head(string $url, array $headers = []): PromiseInterface * @param ReadableStreamInterface|string $body * @return PromiseInterface */ - public static function patch(string $url, array $headers = [], $body = ''): PromiseInterface + public static function patch(string $url, array $headers = [], ReadableStreamInterface|string $body = ''): PromiseInterface { return (new static())->execute('PATCH', $url, $headers, $body); } @@ -108,7 +108,7 @@ public static function patch(string $url, array $headers = [], $body = ''): Prom * @param ReadableStreamInterface|string $body * @return PromiseInterface */ - public static function put(string $url, array $headers = [], $body = ''): PromiseInterface + public static function put(string $url, array $headers = [], ReadableStreamInterface|string $body = ''): PromiseInterface { return (new static())->execute('PUT', $url, $headers, $body); }