@@ -102,10 +102,10 @@ discard block |
||
102 | 102 | }, |
103 | 103 | function (RequestException $exception) use ($deferred) { |
104 | 104 | if (!empty($exception->getResponse()->getBody())) { |
105 | - $deferred->resolve(new TelegramRawData((string) $exception->getResponse() |
|
106 | - ->getBody(), $exception)); |
|
105 | + $deferred->resolve(new TelegramRawData((string) $exception->getResponse() |
|
106 | + ->getBody(), $exception)); |
|
107 | 107 | } else { |
108 | - $deferred->reject($exception); |
|
108 | + $deferred->reject($exception); |
|
109 | 109 | } |
110 | 110 | }); |
111 | 111 | |
@@ -128,10 +128,10 @@ discard block |
||
128 | 128 | }, |
129 | 129 | function (RequestException $exception) use ($deferred) { |
130 | 130 | if (!empty($exception->getResponse()->getBody())) { |
131 | - $deferred->resolve(new TelegramRawData((string) $exception->getResponse() |
|
132 | - ->getBody(), $exception)); |
|
131 | + $deferred->resolve(new TelegramRawData((string) $exception->getResponse() |
|
132 | + ->getBody(), $exception)); |
|
133 | 133 | } else { |
134 | - $deferred->reject($exception); |
|
134 | + $deferred->reject($exception); |
|
135 | 135 | } |
136 | 136 | }); |
137 | 137 |
@@ -72,15 +72,13 @@ |
||
72 | 72 | try { |
73 | 73 | $response = $this->httpClient->post($uri, $formData); |
74 | 74 | $this->logger->debug('Got response back from Telegram, applying json_decode'); |
75 | - } |
|
76 | - catch (ClientException $e) { |
|
75 | + } catch (ClientException $e) { |
|
77 | 76 | $response = $e->getResponse(); |
78 | 77 | // It can happen that we have a network problem, in such case, we can't do nothing about it, so rethrow |
79 | 78 | if (empty($response)) { |
80 | 79 | throw $e; |
81 | 80 | } |
82 | - } |
|
83 | - finally { |
|
81 | + } finally { |
|
84 | 82 | return new TelegramRawData((string) $response->getBody(), $e); |
85 | 83 | } |
86 | 84 | } |