@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | $this->log( |
| 46 | 46 | LogLevel::INFO, |
| 47 | - "Dispatcher send message #{$message->getId()} to driver " . get_class($this->driver), |
|
| 47 | + "Dispatcher send message #{$message->getId()} to driver ".get_class($this->driver), |
|
| 48 | 48 | $this->messageLoggerContext($message) |
| 49 | 49 | ); |
| 50 | 50 | return $this; |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | true, |
| 70 | 70 | false, |
| 71 | 71 | false, |
| 72 | - function ($rabbitMessage) use ($callback) { |
|
| 72 | + function($rabbitMessage) use ($callback) { |
|
| 73 | 73 | $message = $this->serializer->unserialize($rabbitMessage->body); |
| 74 | 74 | $callback($message); |
| 75 | 75 | } |
@@ -103,7 +103,7 @@ |
||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | // check schedule |
| 106 | - $messagesString = $this->redis->zRangeByScore($this->scheduleKey, '-inf', (string)microtime(true), ['limit' => [0, 1]]); |
|
| 106 | + $messagesString = $this->redis->zRangeByScore($this->scheduleKey, '-inf', (string) microtime(true), ['limit' => [0, 1]]); |
|
| 107 | 107 | if (count($messagesString)) { |
| 108 | 108 | foreach ($messagesString as $messageString) { |
| 109 | 109 | $this->redis->zRem($this->scheduleKey, $messageString); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function serialize(MessageInterface $message): string |
| 12 | 12 | { |
| 13 | - $result = json_encode([ |
|
| 13 | + $result = json_encode([ |
|
| 14 | 14 | 'message' => [ |
| 15 | 15 | 'id' => $message->getId(), |
| 16 | 16 | 'type' => $message->getType(), |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | $this->log( |
| 84 | 84 | LogLevel::INFO, |
| 85 | - "Dispatcher send message #{$message->getId()} with priority {$priority} to driver " . get_class($this->driver), |
|
| 85 | + "Dispatcher send message #{$message->getId()} with priority {$priority} to driver ".get_class($this->driver), |
|
| 86 | 86 | $this->messageLoggerContext($message) |
| 87 | 87 | ); |
| 88 | 88 | return $this; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | public function handle(array $priorities = []): void |
| 103 | 103 | { |
| 104 | 104 | try { |
| 105 | - $this->driver->wait(function (MessageInterface $message, int $priority = Dispatcher::DEFAULT_PRIORITY) { |
|
| 105 | + $this->driver->wait(function(MessageInterface $message, int $priority = Dispatcher::DEFAULT_PRIORITY) { |
|
| 106 | 106 | $this->log( |
| 107 | 107 | LogLevel::INFO, |
| 108 | 108 | "Start handle message #{$message->getId()} ({$message->getType()}) priority:{$priority}", |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } catch (Exception $e) { |
| 181 | 181 | $this->log( |
| 182 | 182 | LogLevel::ERROR, |
| 183 | - "Handler " . get_class($handler) . " throws exception - {$e->getMessage()}", |
|
| 183 | + "Handler ".get_class($handler)." throws exception - {$e->getMessage()}", |
|
| 184 | 184 | ['error' => $e, 'message' => $this->messageLoggerContext($message), 'exception' => $e] |
| 185 | 185 | ); |
| 186 | 186 | if (Debugger::isEnabled()) { |