Completed
Push — master ( b6555f...35a2b0 )
by Mike
03:24
created
src/Predis/PredisAdapter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 class PredisAdapter implements QueueAdapterInterface, SchedulerAdapterInterface
17 17
 {
18 18
 
19
-    const LUA_PATH = __DIR__ . '/../../lua';
19
+    const LUA_PATH = __DIR__.'/../../lua';
20 20
 
21 21
     private $client;
22 22
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     public function queueCommand(string $queueName, string $id, string $serialized)
29 29
     {
30
-        $this->executeLuaScript('queue_message', [$queueName, $id, $serialized]);
30
+        $this->executeLuaScript('queue_message', [ $queueName, $id, $serialized ]);
31 31
     }
32 32
 
33 33
     public function awaitCommand(string $queueName, int $timeout = null): ReceivedCommand
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             $id = null;
41 41
         }
42 42
         if (!empty($id)) {
43
-            $serialized = $this->executeLuaScript('receive_message', [$queueName, $id]);
43
+            $serialized = $this->executeLuaScript('receive_message', [ $queueName, $id ]);
44 44
             if (!empty($serialized)) {
45 45
                 return new ReceivedCommand($queueName, $id, $serialized);
46 46
             }
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function setCommandCompleted(string $queueName, string $id)
63 63
     {
64
-        $this->executeLuaScript('acknowledge_message', [$queueName, $id]);
64
+        $this->executeLuaScript('acknowledge_message', [ $queueName, $id ]);
65 65
     }
66 66
 
67 67
     public function setCommandFailed(string $queueName, string $id)
68 68
     {
69
-        $this->executeLuaScript('reject_message', [$queueName, $id]);
69
+        $this->executeLuaScript('reject_message', [ $queueName, $id ]);
70 70
     }
71 71
 
72 72
     public function putQueue(string $queueName)
@@ -110,23 +110,23 @@  discard block
 block discarded – undo
110 110
 
111 111
     public function clearQueue(string $queueName)
112 112
     {
113
-        $this->executeLuaScript('empty_queue', [$queueName]);
113
+        $this->executeLuaScript('empty_queue', [ $queueName ]);
114 114
     }
115 115
 
116 116
     public function deleteQueue(string $queueName)
117 117
     {
118 118
         $this->clearQueue($queueName);
119
-        $this->clearSchedule([$queueName]);
119
+        $this->clearSchedule([ $queueName ]);
120 120
     }
121 121
 
122 122
     public function purgeCommand(string $queueName, string $id)
123 123
     {
124
-        $this->executeLuaScript('purge_message', [$queueName, $id]);
124
+        $this->executeLuaScript('purge_message', [ $queueName, $id ]);
125 125
     }
126 126
 
127 127
     public function scheduleCommand(string $queueName, string $id, string $serialized, \DateTime $dateTime)
128 128
     {
129
-        $this->executeLuaScript('schedule_message', [$queueName, $id, $serialized, $dateTime->getTimestamp()]);
129
+        $this->executeLuaScript('schedule_message', [ $queueName, $id, $serialized, $dateTime->getTimestamp() ]);
130 130
     }
131 131
 
132 132
     public function cancelScheduledCommand(string $queueName, string $id)
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
     private function executeLuaScript(string $script, array $args)
183 183
     {
184
-        $command = new LuaFileCommand(static::LUA_PATH . '/' . $script . '.lua');
184
+        $command = new LuaFileCommand(static::LUA_PATH.'/'.$script.'.lua');
185 185
         $command->setArguments($args);
186 186
         return $this->client->executeCommand($command);
187 187
     }
Please login to merge, or discard this patch.