@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function execute(): void |
| 45 | 45 | { |
| 46 | - $this->worker->onWorkerStart = function () { |
|
| 46 | + $this->worker->onWorkerStart = function() { |
|
| 47 | 47 | |
| 48 | - $connection = new AsyncTcpConnection($this->hostStream.'/'.self::CHANNEL_ACCESS.'/'.$this->streamType); |
|
| 48 | + $connection = new AsyncTcpConnection($this->hostStream . '/' . self::CHANNEL_ACCESS . '/' . $this->streamType); |
|
| 49 | 49 | $connection->transport = 'ssl'; |
| 50 | 50 | |
| 51 | 51 | $heartbeatTimerId = Timer::add(20, function() use ($connection) { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * @param $connection |
| 59 | 59 | * @return void |
| 60 | 60 | */ |
| 61 | - $connection->onConnect = function ($connection) use (&$heartbeatTimerId) { |
|
| 61 | + $connection->onConnect = function($connection) use (&$heartbeatTimerId) { |
|
| 62 | 62 | $connection->send(json_encode(["op" => $this->operation, "args" => $this->topic])); |
| 63 | 63 | }; |
| 64 | 64 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * @return void |
| 73 | 73 | * @throws \Exception |
| 74 | 74 | */ |
| 75 | - $connection->onMessage = function ($connection, $message) use ($callback) { |
|
| 75 | + $connection->onMessage = function($connection, $message) use ($callback) { |
|
| 76 | 76 | $message = json_decode($message, true); |
| 77 | 77 | $responseDto = $this->getResponseClassname($this->streamType); |
| 78 | 78 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @param $connection |
| 103 | 103 | * @return void |
| 104 | 104 | */ |
| 105 | - $this->worker->onClose = function ($connection) use (&$heartbeatTimerId) { |
|
| 105 | + $this->worker->onClose = function($connection) use (&$heartbeatTimerId) { |
|
| 106 | 106 | Timer::del($heartbeatTimerId); |
| 107 | 107 | }; |
| 108 | 108 | |