Skip to content

Commit

Permalink
fix: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmard committed Dec 30, 2022
1 parent 82a122c commit 0cba3a2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 0cba3a2

Please sign in to comment.