Completed
Pull Request — master (#43)
by Tomas
13:02
created
src/Dispatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
         $this->log(
87 87
             LogLevel::INFO,
88
-            "Dispatcher send message #{$message->getId()} with priority {$priority} to driver " . get_class($this->driver),
88
+            "Dispatcher send message #{$message->getId()} with priority {$priority} to driver ".get_class($this->driver),
89 89
             $this->messageLoggerContext($message)
90 90
         );
91 91
         return $this;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     public function handle(array $priorities = []): void
106 106
     {
107 107
         try {
108
-            $this->driver->wait(function (MessageInterface $message, int $priority = Dispatcher::PRIORITY_MEDIUM) {
108
+            $this->driver->wait(function(MessageInterface $message, int $priority = Dispatcher::PRIORITY_MEDIUM) {
109 109
                 $this->log(
110 110
                     LogLevel::INFO,
111 111
                     "Start handle message #{$message->getId()} ({$message->getType()}) priority:{$priority}",
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         } catch (Exception $e) {
184 184
             $this->log(
185 185
                 LogLevel::ERROR,
186
-                "Handler " . get_class($handler) . " throws exception - {$e->getMessage()}",
186
+                "Handler ".get_class($handler)." throws exception - {$e->getMessage()}",
187 187
                 ['error' => $e, 'message' => $this->messageLoggerContext($message), 'exception' => $e]
188 188
             );
189 189
             if (Debugger::isEnabled()) {
Please login to merge, or discard this patch.
src/Driver/RedisSetDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
                 }
120 120
             }
121 121
             if ($this->redis instanceof Redis) {
122
-                $messagesString = $this->redis->zRangeByScore($this->scheduleKey, '-inf', (string)microtime(true), ['limit' => [0, 1]]);
122
+                $messagesString = $this->redis->zRangeByScore($this->scheduleKey, '-inf', (string) microtime(true), ['limit' => [0, 1]]);
123 123
                 if (count($messagesString)) {
124 124
                     foreach ($messagesString as $messageString) {
125 125
                         $this->redis->zRem($this->scheduleKey, $messageString);
Please login to merge, or discard this patch.
examples/redis/processor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 $redis->connect('127.0.0.1', 6379);
13 13
 $driver = new RedisSetDriver($redis, 'hermes', 1);
14 14
 $driver->setRestart(new RedisRestart($redis));
15
-$driver->setupPriorityQueue('hermes_low',\Tomaj\Hermes\Dispatcher::PRIORITY_LOW);
16
-$driver->setupPriorityQueue('hermes_high',\Tomaj\Hermes\Dispatcher::PRIORITY_HIGH);
15
+$driver->setupPriorityQueue('hermes_low', \Tomaj\Hermes\Dispatcher::PRIORITY_LOW);
16
+$driver->setupPriorityQueue('hermes_high', \Tomaj\Hermes\Dispatcher::PRIORITY_HIGH);
17 17
 
18 18
 $dispatcher = new Dispatcher($driver);
19 19
 
Please login to merge, or discard this patch.
examples/redis/emitter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
10 10
 $redis = new Redis();
11 11
 $redis->connect('127.0.0.1', 6379);
12 12
 $driver = new RedisSetDriver($redis);
13
-$driver->setupPriorityQueue('hermes_low',\Tomaj\Hermes\Dispatcher::PRIORITY_LOW);
14
-$driver->setupPriorityQueue('hermes_high',\Tomaj\Hermes\Dispatcher::PRIORITY_HIGH);
13
+$driver->setupPriorityQueue('hermes_low', \Tomaj\Hermes\Dispatcher::PRIORITY_LOW);
14
+$driver->setupPriorityQueue('hermes_high', \Tomaj\Hermes\Dispatcher::PRIORITY_HIGH);
15 15
 
16 16
 $emitter = new Emitter($driver);
17 17
 
Please login to merge, or discard this patch.