@@ -30,14 +30,14 @@ |
||
| 30 | 30 | try { |
| 31 | 31 | $client = new \GuzzleHttp\Client(); |
| 32 | 32 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 33 | - $response = json_decode( $json_response->getBody() ); |
|
| 33 | + $response = json_decode($json_response->getBody()); |
|
| 34 | 34 | } |
| 35 | 35 | catch (RequestException $e) { |
| 36 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 36 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - if($response->{'ok'} === FALSE) { |
|
| 40 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 39 | + if ($response->{'ok'} === FALSE) { |
|
| 40 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return $json_response->getBody(); |
@@ -41,14 +41,14 @@ |
||
| 41 | 41 | try { |
| 42 | 42 | $client = new \GuzzleHttp\Client(); |
| 43 | 43 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 44 | - $response = json_decode( $json_response->getBody() ); |
|
| 44 | + $response = json_decode($json_response->getBody()); |
|
| 45 | 45 | } |
| 46 | 46 | catch (RequestException $e) { |
| 47 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 47 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - if($response->{'ok'} === FALSE) { |
|
| 51 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 50 | + if ($response->{'ok'} === FALSE) { |
|
| 51 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | return $json_response->getBody(); |
@@ -57,14 +57,14 @@ |
||
| 57 | 57 | try { |
| 58 | 58 | $client = new \GuzzleHttp\Client(); |
| 59 | 59 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 60 | - $response = json_decode( $json_response->getBody() ); |
|
| 60 | + $response = json_decode($json_response->getBody()); |
|
| 61 | 61 | } |
| 62 | 62 | catch (RequestException $e) { |
| 63 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 63 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if($response->{'ok'} === FALSE) { |
|
| 67 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 66 | + if ($response->{'ok'} === FALSE) { |
|
| 67 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | return $json_response->getBody(); |
@@ -66,14 +66,14 @@ discard block |
||
| 66 | 66 | try { |
| 67 | 67 | $client = new \GuzzleHttp\Client(); |
| 68 | 68 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 69 | - $response = json_decode( $json_response->getBody() ); |
|
| 69 | + $response = json_decode($json_response->getBody()); |
|
| 70 | 70 | } |
| 71 | 71 | catch (RequestException $e) { |
| 72 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 72 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - if($response->{'ok'} === FALSE) { |
|
| 76 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 75 | + if ($response->{'ok'} === FALSE) { |
|
| 76 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | return $json_response->getBody(); |
@@ -131,14 +131,14 @@ discard block |
||
| 131 | 131 | try { |
| 132 | 132 | $client = new \GuzzleHttp\Client(); |
| 133 | 133 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 134 | - $response = json_decode( $json_response->getBody() ); |
|
| 134 | + $response = json_decode($json_response->getBody()); |
|
| 135 | 135 | } |
| 136 | 136 | catch (RequestException $e) { |
| 137 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 137 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - if($response->{'ok'} === FALSE) { |
|
| 141 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 140 | + if ($response->{'ok'} === FALSE) { |
|
| 141 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 142 | 142 | } |
| 143 | 143 | |
| 144 | 144 | return $json_response->getBody(); |
@@ -196,14 +196,14 @@ discard block |
||
| 196 | 196 | try { |
| 197 | 197 | $client = new \GuzzleHttp\Client(); |
| 198 | 198 | $json_response = $client->request('GET', $this->getUrl(), []); |
| 199 | - $response = json_decode( $json_response->getBody() ); |
|
| 199 | + $response = json_decode($json_response->getBody()); |
|
| 200 | 200 | } |
| 201 | 201 | catch (RequestException $e) { |
| 202 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 202 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | - if($response->{'ok'} === FALSE) { |
|
| 206 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
| 205 | + if ($response->{'ok'} === FALSE) { |
|
| 206 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | return $json_response->getBody(); |
@@ -145,7 +145,7 @@ |
||
| 145 | 145 | ]); |
| 146 | 146 | } |
| 147 | 147 | catch (RequestException $e) { |
| 148 | - throw new RuntimeException('The request to the webhook failed: '.$e->getMessage(), $e->getCode(), $e); |
|
| 148 | + throw new RuntimeException('The request to the webhook failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | // We re-initialize the attachments to prevent any conflict with a future message. |