@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of GitterApi package. |
4 | 4 | * |
@@ -57,12 +57,12 @@ discard block |
||
57 | 57 | */ |
58 | 58 | protected function fetch(Route $route): array |
59 | 59 | { |
60 | - $rescue = (new Evacuator(function () use ($route) { |
|
61 | - return (array)$this->viaHttp()->request($route); |
|
60 | + $rescue = (new Evacuator(function() use ($route) { |
|
61 | + return (array) $this->viaHttp()->request($route); |
|
62 | 62 | })) |
63 | 63 | // If response has status code 4xx |
64 | - ->onError(function (ClientException $e) { |
|
65 | - $this->client->logger->error(get_class($e) . ' ' . $e->getMessage()); |
|
64 | + ->onError(function(ClientException $e) { |
|
65 | + $this->client->logger->error(get_class($e).' '.$e->getMessage()); |
|
66 | 66 | |
67 | 67 | switch ($e->getResponse()->getStatusCode()) { |
68 | 68 | case 429: // 429 Too Many Requests |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | throw $e; |
74 | 74 | }) |
75 | 75 | // On internal errors |
76 | - ->onError(function (RequestException $e) { |
|
76 | + ->onError(function(RequestException $e) { |
|
77 | 77 | $this->client->logger->error($e->getMessage()); |
78 | 78 | |
79 | 79 | // Throws request exception if SSL error |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | }) |
84 | 84 | // Other |
85 | - ->onError(function (\Exception $e) { |
|
85 | + ->onError(function(\Exception $e) { |
|
86 | 86 | $this->client->logger->error($e->getMessage()); |
87 | 87 | throw $e; |
88 | 88 | }) |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | return (new Evacuator(function() use ($route) { |
104 | 104 | return $this->viaStream()->request($route); |
105 | 105 | })) |
106 | - ->onError(function (\Exception $e) { |
|
106 | + ->onError(function(\Exception $e) { |
|
107 | 107 | $this->client->logger->error($e->getMessage()); |
108 | 108 | }) |
109 | 109 | ->retries($this->client->getRetriesCount()) |