Conditions | 3 |
Paths | 5 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
25 | 14 | public function request(HttpClientRequest $request): HttpClientResponse |
|
26 | { |
||
27 | try { |
||
28 | 14 | $response = $this->client->request($request->getMethod(), $request->getUri(), $request->options()); |
|
|
|||
29 | |||
30 | 12 | return new SymfonyResponse($response, $response->getContent()); |
|
31 | 3 | } catch (ClientException | RedirectionException $exception) { |
|
32 | 1 | $response = $exception->getResponse(); |
|
33 | 2 | } catch (ServerException | TransportException | TransportExceptionInterface $exception) { |
|
34 | 2 | throw HttpClientException::fromThrowable($exception); |
|
35 | } |
||
36 | |||
37 | 1 | return new SymfonyResponse($response); |
|
38 | } |
||
40 |