@@ -13,8 +13,8 @@ |
||
13 | 13 | namespace chillerlan\HTTP\Psr18; |
14 | 14 | |
15 | 15 | use chillerlan\HTTP\{HTTPOptions, Psr7, Psr17}; |
16 | -use chillerlan\HTTP\Psr7\Request; |
|
17 | 16 | use chillerlan\HTTP\Psr17\ResponseFactory; |
17 | +use chillerlan\HTTP\Psr7\Request; |
|
18 | 18 | use chillerlan\Settings\SettingsContainerInterface; |
19 | 19 | use Psr\Http\Message\{ResponseFactoryInterface, ResponseInterface}; |
20 | 20 | use Psr\Log\{LoggerAwareInterface, LoggerAwareTrait, LoggerInterface, NullLogger}; |
@@ -14,8 +14,9 @@ |
||
14 | 14 | |
15 | 15 | namespace chillerlan\HTTP\Psr7; |
16 | 16 | |
17 | +use InvalidArgumentException; |
|
18 | +use RuntimeException; |
|
17 | 19 | use chillerlan\HTTP\Psr17; |
18 | -use InvalidArgumentException, RuntimeException; |
|
19 | 20 | |
20 | 21 | /** |
21 | 22 | * @property \chillerlan\HTTP\Psr7\Stream $stream |
@@ -98,7 +98,7 @@ |
||
98 | 98 | * @inheritdoc |
99 | 99 | * @codeCoverageIgnore |
100 | 100 | */ |
101 | - public function getSize():?int{ |
|
101 | + public function getSize(): ?int{ |
|
102 | 102 | return $this->stream->getSize(); |
103 | 103 | } |
104 | 104 |
@@ -52,14 +52,14 @@ |
||
52 | 52 | |
53 | 53 | $requestUri = (string)$uri->withFragment(''); |
54 | 54 | |
55 | - set_error_handler(function ($severity, $msg, $file, $line){ |
|
55 | + set_error_handler(function($severity, $msg, $file, $line){ |
|
56 | 56 | throw new \ErrorException($msg, 0, $severity, $file, $line); |
57 | 57 | }); |
58 | 58 | |
59 | 59 | try{ |
60 | 60 | $responseBody = file_get_contents($requestUri, false, $context); |
61 | 61 | $responseHeaders = $this->parseResponseHeaders(get_headers($requestUri, 1, $context)); |
62 | - }catch(\Exception $e){ |
|
62 | + } catch(\Exception $e){ |
|
63 | 63 | throw new ClientException($e->getMessage(), $e->getCode()); |
64 | 64 | } |
65 | 65 |
@@ -59,7 +59,8 @@ |
||
59 | 59 | try{ |
60 | 60 | $responseBody = file_get_contents($requestUri, false, $context); |
61 | 61 | $responseHeaders = $this->parseResponseHeaders(get_headers($requestUri, 1, $context)); |
62 | - }catch(\Exception $e){ |
|
62 | + } |
|
63 | + catch(\Exception $e){ |
|
63 | 64 | throw new ClientException($e->getMessage(), $e->getCode()); |
64 | 65 | } |
65 | 66 |