@@ -123,6 +123,9 @@ discard block |
||
123 | 123 | return $readable ? $readable : $entity; |
124 | 124 | } |
125 | 125 | |
126 | + /** |
|
127 | + * @param string $readable |
|
128 | + */ |
|
126 | 129 | public function formatUser(string $entity, $readable = null) : string |
127 | 130 | { |
128 | 131 | if ($readable) { |
@@ -137,6 +140,9 @@ discard block |
||
137 | 140 | return $entity; |
138 | 141 | } |
139 | 142 | |
143 | + /** |
|
144 | + * @param string $readable |
|
145 | + */ |
|
140 | 146 | public function formatChannel(string $entity, $readable = null) : string |
141 | 147 | { |
142 | 148 | if ($readable) { |
@@ -26,7 +26,7 @@ |
||
26 | 26 | $clientFactory = new ReactAwareGuzzleClientFactory(); |
27 | 27 | $reactAwareCurlFactory = $clientFactory->createReactAwareCurlFactory($this->eventLoop, null, $this->logger); |
28 | 28 | $handler = $reactAwareCurlFactory->getHandler(); |
29 | - $handlerStack = $this->createHandlerStack($handler); |
|
29 | + $handlerStack = $this->createHandlerStack($handler); |
|
30 | 30 | $config['handler'] = $handlerStack; |
31 | 31 | |
32 | 32 | return new Client($config); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | protected function logMessage($data) |
180 | 180 | { |
181 | 181 | if ($this->messageLog !== null) { |
182 | - file_put_contents($this->messageLog, json_encode($data) . "\n", FILE_APPEND); |
|
182 | + file_put_contents($this->messageLog, json_encode($data)."\n", FILE_APPEND); |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | |
196 | 196 | $this->ping(); |
197 | 197 | |
198 | - return $this->loop->addPeriodicTimer($interval, function () { |
|
198 | + return $this->loop->addPeriodicTimer($interval, function() { |
|
199 | 199 | |
200 | 200 | if (!$this->pong) { |
201 | 201 | $this->getLog()->error('No pong: reconnecting...'); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | |
214 | 214 | $this->getSlack()->ping() |
215 | 215 | ->then( |
216 | - function (Payload $payload) { |
|
216 | + function(Payload $payload) { |
|
217 | 217 | $this->getLog()->info($payload->toJson()); |
218 | 218 | $this->pong = true; |
219 | 219 | } |
@@ -227,11 +227,11 @@ discard block |
||
227 | 227 | } |
228 | 228 | |
229 | 229 | $this->getSlack()->reconnect()->then( |
230 | - function () { |
|
230 | + function() { |
|
231 | 231 | $this->getLog()->info('Reconnected'); |
232 | 232 | $this->monitor = $this->startConnectionMonitor(); |
233 | 233 | }, |
234 | - function () { |
|
234 | + function() { |
|
235 | 235 | $this->getLog()->error('Reconnect failed, shutting down.'); |
236 | 236 | $this->shutDown(); |
237 | 237 | } |