|
@@ 95-99 (lines=5) @@
|
| 92 |
|
|
| 93 |
|
public function send(string $method, $uri, array $headers = [], $body = null): ResponseInterface |
| 94 |
|
{ |
| 95 |
|
if (!is_string($uri) && !$uri instanceof UriInterface) { |
| 96 |
|
throw new \TypeError( |
| 97 |
|
sprintf('%s::send(): Argument #2 ($uri) must be of type string|%s, %s given', self::class, UriInterface::class, get_debug_type($uri)) |
| 98 |
|
); |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
if (!is_string($body) && !$body instanceof StreamInterface && null !== $body) { |
| 102 |
|
throw new \TypeError( |
|
@@ 101-105 (lines=5) @@
|
| 98 |
|
); |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
if (!is_string($body) && !$body instanceof StreamInterface && null !== $body) { |
| 102 |
|
throw new \TypeError( |
| 103 |
|
sprintf('%s::send(): Argument #4 ($body) must be of type string|%s|null, %s given', self::class, StreamInterface::class, get_debug_type($body)) |
| 104 |
|
); |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
return $this->sendRequest( |
| 108 |
|
self::createRequest($method, $uri, $headers, $body) |