@@ -41,14 +41,14 @@ discard block |
||
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 $this; |
@@ -81,14 +81,14 @@ discard block |
||
81 | 81 | try { |
82 | 82 | $client = new \GuzzleHttp\Client(); |
83 | 83 | $json_response = $client->request('GET', $this->getUrl(), []); |
84 | - $response = json_decode( $json_response->getBody() ); |
|
84 | + $response = json_decode($json_response->getBody()); |
|
85 | 85 | } |
86 | 86 | catch (RequestException $e) { |
87 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
87 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
88 | 88 | } |
89 | 89 | |
90 | - if($response->{'ok'} === FALSE) { |
|
91 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
90 | + if ($response->{'ok'} === FALSE) { |
|
91 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | return $json_response->getBody(); |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | try { |
122 | 122 | $client = new \GuzzleHttp\Client(); |
123 | 123 | $json_response = $client->request('GET', $this->getUrl(), []); |
124 | - $response = json_decode( $json_response->getBody() ); |
|
124 | + $response = json_decode($json_response->getBody()); |
|
125 | 125 | } |
126 | 126 | catch (RequestException $e) { |
127 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
127 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
128 | 128 | } |
129 | 129 | |
130 | - if($response->{'ok'} === FALSE) { |
|
131 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
130 | + if ($response->{'ok'} === FALSE) { |
|
131 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | return $json_response->getBody(); |
@@ -161,14 +161,14 @@ discard block |
||
161 | 161 | try { |
162 | 162 | $client = new \GuzzleHttp\Client(); |
163 | 163 | $json_response = $client->request('GET', $this->getUrl(), []); |
164 | - $response = json_decode( $json_response->getBody() ); |
|
164 | + $response = json_decode($json_response->getBody()); |
|
165 | 165 | } |
166 | 166 | catch (RequestException $e) { |
167 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
167 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
168 | 168 | } |
169 | 169 | |
170 | - if($response->{'ok'} === FALSE) { |
|
171 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
170 | + if ($response->{'ok'} === FALSE) { |
|
171 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | return $json_response->getBody(); |
@@ -215,9 +215,9 @@ discard block |
||
215 | 215 | "channel" => $channel, |
216 | 216 | "latest" => $latest, |
217 | 217 | "oldest" => $oldest, |
218 | - "inclusive" => (string)$inclusive, |
|
219 | - "count" => (string)$count, |
|
220 | - "unreads" => (string)$unreads |
|
218 | + "inclusive" => (string) $inclusive, |
|
219 | + "count" => (string) $count, |
|
220 | + "unreads" => (string) $unreads |
|
221 | 221 | ); |
222 | 222 | |
223 | 223 | $this->setUrl("groups.history", $arguments); |
@@ -226,14 +226,14 @@ discard block |
||
226 | 226 | try { |
227 | 227 | $client = new \GuzzleHttp\Client(); |
228 | 228 | $json_response = $client->request('GET', $this->getUrl(), []); |
229 | - $response = json_decode( $json_response->getBody() ); |
|
229 | + $response = json_decode($json_response->getBody()); |
|
230 | 230 | } |
231 | 231 | catch (RequestException $e) { |
232 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
232 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
233 | 233 | } |
234 | 234 | |
235 | - if($response->{'ok'} === FALSE) { |
|
236 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
235 | + if ($response->{'ok'} === FALSE) { |
|
236 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | return $json_response->getBody(); |
@@ -266,14 +266,14 @@ discard block |
||
266 | 266 | try { |
267 | 267 | $client = new \GuzzleHttp\Client(); |
268 | 268 | $json_response = $client->request('GET', $this->getUrl(), []); |
269 | - $response = json_decode( $json_response->getBody() ); |
|
269 | + $response = json_decode($json_response->getBody()); |
|
270 | 270 | } |
271 | 271 | catch (RequestException $e) { |
272 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
272 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
273 | 273 | } |
274 | 274 | |
275 | - if($response->{'ok'} === FALSE) { |
|
276 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
275 | + if ($response->{'ok'} === FALSE) { |
|
276 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | return $json_response->getBody(); |
@@ -311,14 +311,14 @@ discard block |
||
311 | 311 | try { |
312 | 312 | $client = new \GuzzleHttp\Client(); |
313 | 313 | $json_response = $client->request('GET', $this->getUrl(), []); |
314 | - $response = json_decode( $json_response->getBody() ); |
|
314 | + $response = json_decode($json_response->getBody()); |
|
315 | 315 | } |
316 | 316 | catch (RequestException $e) { |
317 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
317 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
318 | 318 | } |
319 | 319 | |
320 | - if($response->{'ok'} === FALSE) { |
|
321 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
320 | + if ($response->{'ok'} === FALSE) { |
|
321 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | return $json_response->getBody(); |
@@ -356,14 +356,14 @@ discard block |
||
356 | 356 | try { |
357 | 357 | $client = new \GuzzleHttp\Client(); |
358 | 358 | $json_response = $client->request('GET', $this->getUrl(), []); |
359 | - $response = json_decode( $json_response->getBody() ); |
|
359 | + $response = json_decode($json_response->getBody()); |
|
360 | 360 | } |
361 | 361 | catch (RequestException $e) { |
362 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
362 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
363 | 363 | } |
364 | 364 | |
365 | - if($response->{'ok'} === FALSE) { |
|
366 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
365 | + if ($response->{'ok'} === FALSE) { |
|
366 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
367 | 367 | } |
368 | 368 | |
369 | 369 | return $this; |
@@ -396,14 +396,14 @@ discard block |
||
396 | 396 | try { |
397 | 397 | $client = new \GuzzleHttp\Client(); |
398 | 398 | $json_response = $client->request('GET', $this->getUrl(), []); |
399 | - $response = json_decode( $json_response->getBody() ); |
|
399 | + $response = json_decode($json_response->getBody()); |
|
400 | 400 | } |
401 | 401 | catch (RequestException $e) { |
402 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
402 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
403 | 403 | } |
404 | 404 | |
405 | - if($response->{'ok'} === FALSE) { |
|
406 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
405 | + if ($response->{'ok'} === FALSE) { |
|
406 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
407 | 407 | } |
408 | 408 | |
409 | 409 | return $this; |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | |
428 | 428 | // Set the arguments of the request |
429 | 429 | $arguments = array( |
430 | - "exclude_archived" => (string)$exclude_archived |
|
430 | + "exclude_archived" => (string) $exclude_archived |
|
431 | 431 | ); |
432 | 432 | |
433 | 433 | $this->setUrl("groups.list", $arguments); |
@@ -436,14 +436,14 @@ discard block |
||
436 | 436 | try { |
437 | 437 | $client = new \GuzzleHttp\Client(); |
438 | 438 | $json_response = $client->request('GET', $this->getUrl(), []); |
439 | - $response = json_decode( $json_response->getBody() ); |
|
439 | + $response = json_decode($json_response->getBody()); |
|
440 | 440 | } |
441 | 441 | catch (RequestException $e) { |
442 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
442 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
443 | 443 | } |
444 | 444 | |
445 | - if($response->{'ok'} === FALSE) { |
|
446 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
445 | + if ($response->{'ok'} === FALSE) { |
|
446 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
447 | 447 | } |
448 | 448 | |
449 | 449 | return $json_response->getBody(); |
@@ -481,14 +481,14 @@ discard block |
||
481 | 481 | try { |
482 | 482 | $client = new \GuzzleHttp\Client(); |
483 | 483 | $json_response = $client->request('GET', $this->getUrl(), []); |
484 | - $response = json_decode( $json_response->getBody() ); |
|
484 | + $response = json_decode($json_response->getBody()); |
|
485 | 485 | } |
486 | 486 | catch (RequestException $e) { |
487 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
487 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
488 | 488 | } |
489 | 489 | |
490 | - if($response->{'ok'} === FALSE) { |
|
491 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
490 | + if ($response->{'ok'} === FALSE) { |
|
491 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
492 | 492 | } |
493 | 493 | |
494 | 494 | return $this; |
@@ -521,14 +521,14 @@ discard block |
||
521 | 521 | try { |
522 | 522 | $client = new \GuzzleHttp\Client(); |
523 | 523 | $json_response = $client->request('GET', $this->getUrl(), []); |
524 | - $response = json_decode( $json_response->getBody() ); |
|
524 | + $response = json_decode($json_response->getBody()); |
|
525 | 525 | } |
526 | 526 | catch (RequestException $e) { |
527 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
527 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
528 | 528 | } |
529 | 529 | |
530 | - if($response->{'ok'} === FALSE) { |
|
531 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
530 | + if ($response->{'ok'} === FALSE) { |
|
531 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
532 | 532 | } |
533 | 533 | |
534 | 534 | return $json_response->getBody(); |
@@ -566,14 +566,14 @@ discard block |
||
566 | 566 | try { |
567 | 567 | $client = new \GuzzleHttp\Client(); |
568 | 568 | $json_response = $client->request('GET', $this->getUrl(), []); |
569 | - $response = json_decode( $json_response->getBody() ); |
|
569 | + $response = json_decode($json_response->getBody()); |
|
570 | 570 | } |
571 | 571 | catch (RequestException $e) { |
572 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
572 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
573 | 573 | } |
574 | 574 | |
575 | - if($response->{'ok'} === FALSE) { |
|
576 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
575 | + if ($response->{'ok'} === FALSE) { |
|
576 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | return $json_response->getBody(); |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | // Set the arguments of the request |
603 | 603 | $arguments = array( |
604 | 604 | "channel" => $channel, |
605 | - "thread_ts" => (string)$thread_ts |
|
605 | + "thread_ts" => (string) $thread_ts |
|
606 | 606 | ); |
607 | 607 | |
608 | 608 | $this->setUrl("groups.replies", $arguments); |
@@ -611,14 +611,14 @@ discard block |
||
611 | 611 | try { |
612 | 612 | $client = new \GuzzleHttp\Client(); |
613 | 613 | $json_response = $client->request('GET', $this->getUrl(), []); |
614 | - $response = json_decode( $json_response->getBody() ); |
|
614 | + $response = json_decode($json_response->getBody()); |
|
615 | 615 | } |
616 | 616 | catch (RequestException $e) { |
617 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
617 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
618 | 618 | } |
619 | 619 | |
620 | - if($response->{'ok'} === FALSE) { |
|
621 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
620 | + if ($response->{'ok'} === FALSE) { |
|
621 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
622 | 622 | } |
623 | 623 | |
624 | 624 | return $json_response->getBody(); |
@@ -656,14 +656,14 @@ discard block |
||
656 | 656 | try { |
657 | 657 | $client = new \GuzzleHttp\Client(); |
658 | 658 | $json_response = $client->request('GET', $this->getUrl(), []); |
659 | - $response = json_decode( $json_response->getBody() ); |
|
659 | + $response = json_decode($json_response->getBody()); |
|
660 | 660 | } |
661 | 661 | catch (RequestException $e) { |
662 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
662 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
663 | 663 | } |
664 | 664 | |
665 | - if($response->{'ok'} === FALSE) { |
|
666 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
665 | + if ($response->{'ok'} === FALSE) { |
|
666 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
667 | 667 | } |
668 | 668 | |
669 | 669 | return $this; |
@@ -701,14 +701,14 @@ discard block |
||
701 | 701 | try { |
702 | 702 | $client = new \GuzzleHttp\Client(); |
703 | 703 | $json_response = $client->request('GET', $this->getUrl(), []); |
704 | - $response = json_decode( $json_response->getBody() ); |
|
704 | + $response = json_decode($json_response->getBody()); |
|
705 | 705 | } |
706 | 706 | catch (RequestException $e) { |
707 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
707 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
708 | 708 | } |
709 | 709 | |
710 | - if($response->{'ok'} === FALSE) { |
|
711 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
710 | + if ($response->{'ok'} === FALSE) { |
|
711 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
712 | 712 | } |
713 | 713 | |
714 | 714 | return $this; |
@@ -741,14 +741,14 @@ discard block |
||
741 | 741 | try { |
742 | 742 | $client = new \GuzzleHttp\Client(); |
743 | 743 | $json_response = $client->request('GET', $this->getUrl(), []); |
744 | - $response = json_decode( $json_response->getBody() ); |
|
744 | + $response = json_decode($json_response->getBody()); |
|
745 | 745 | } |
746 | 746 | catch (RequestException $e) { |
747 | - throw new RuntimeException('The request to the API failed: '.$e->getMessage(), $e->getCode(), $e); |
|
747 | + throw new RuntimeException('The request to the API failed: ' . $e->getMessage(), $e->getCode(), $e); |
|
748 | 748 | } |
749 | 749 | |
750 | - if($response->{'ok'} === FALSE) { |
|
751 | - throw new RuntimeException('The request to the API failed: '.$response->{'error'}."."); |
|
750 | + if ($response->{'ok'} === FALSE) { |
|
751 | + throw new RuntimeException('The request to the API failed: ' . $response->{'error'} . "."); |
|
752 | 752 | } |
753 | 753 | |
754 | 754 | return $this; |
@@ -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(); |