@@ -94,16 +94,16 @@ discard block |
||
| 94 | 94 | $this->getLog()->info('Connecting...'); |
| 95 | 95 | |
| 96 | 96 | Timer\timeout($slack->connect(), 30, $this->getLoop()) |
| 97 | - ->then(function () { |
|
| 97 | + ->then(function() { |
|
| 98 | 98 | $this->getLog()->info('Connected.'); |
| 99 | 99 | $this->connected(); |
| 100 | 100 | }) |
| 101 | - ->otherwise(function (Timer\TimeoutException $error) { |
|
| 101 | + ->otherwise(function(Timer\TimeoutException $error) { |
|
| 102 | 102 | $this->getLog()->error($error->getMessage()); |
| 103 | 103 | $this->getLog()->error('Connection failed, shutting down.'); |
| 104 | 104 | $this->shutDown(); |
| 105 | 105 | }) |
| 106 | - ->otherwise(function ($error) { |
|
| 106 | + ->otherwise(function($error) { |
|
| 107 | 107 | $this->getLog()->error('Connection failed, shutting down.'); |
| 108 | 108 | $this->shutDown(); |
| 109 | 109 | }); |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | $this->getSlack()->reconnect()->then( |
| 133 | - function () { |
|
| 133 | + function() { |
|
| 134 | 134 | $this->getLog()->info('Reconnected'); |
| 135 | 135 | $this->monitor = $this->startConnectionMonitor(); |
| 136 | 136 | }, |
| 137 | - function () { |
|
| 137 | + function() { |
|
| 138 | 138 | $this->getLog()->error('Reconnect failed, shutting down.'); |
| 139 | 139 | $this->shutDown(); |
| 140 | 140 | } |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | protected function logMessage($data) |
| 224 | 224 | { |
| 225 | 225 | if ($this->messageLog !== null) { |
| 226 | - file_put_contents($this->messageLog, json_encode($data) . "\n", FILE_APPEND); |
|
| 226 | + file_put_contents($this->messageLog, json_encode($data)."\n", FILE_APPEND); |
|
| 227 | 227 | } |
| 228 | 228 | } |
| 229 | 229 | |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | $this->ping(); |
| 241 | 241 | |
| 242 | - return $this->loop->addPeriodicTimer($interval, function () { |
|
| 242 | + return $this->loop->addPeriodicTimer($interval, function() { |
|
| 243 | 243 | $this->checkPong(); |
| 244 | 244 | $this->ping(); |
| 245 | 245 | }); |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | $this->getSlack()->ping() |
| 274 | 274 | ->then( |
| 275 | - function (Payload $payload) { |
|
| 275 | + function(Payload $payload) { |
|
| 276 | 276 | $this->getLog()->info($payload->toJson()); |
| 277 | 277 | $this->pong = true; |
| 278 | 278 | } |