@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | final class RedisDriver implements QueueDriverInterface, SchedulerDriverInterface |
15 | 15 | { |
16 | 16 | |
17 | - const LUA_PATH = __DIR__ . '/../../lua'; |
|
17 | + const LUA_PATH = __DIR__.'/../../lua'; |
|
18 | 18 | |
19 | 19 | private $adapter; |
20 | 20 | private $namespace; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | public function queueCommand(string $queueName, string $commandId, string $serialized) |
32 | 32 | { |
33 | - $this->evalScript('queue_message', [$this->namespace, $queueName, $commandId, $serialized]); |
|
33 | + $this->evalScript('queue_message', [ $this->namespace, $queueName, $commandId, $serialized ]); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function awaitCommand(string $queueName, int $time = null): ReceivedCommand |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | if (empty($id)) { |
44 | 44 | throw new TimeoutException; |
45 | 45 | } |
46 | - $serialized = $this->evalScript('receive_message', [$this->namespace, $queueName, $id]); |
|
46 | + $serialized = $this->evalScript('receive_message', [ $this->namespace, $queueName, $id ]); |
|
47 | 47 | if (empty($serialized)) { |
48 | 48 | throw new DriverException(sprintf('Error retrieving command %s.', $id)); |
49 | 49 | } |
@@ -101,19 +101,19 @@ discard block |
||
101 | 101 | |
102 | 102 | public function deleteQueue(string $queueName) |
103 | 103 | { |
104 | - $this->evalScript('empty_queue', [$this->namespace, $queueName]); |
|
104 | + $this->evalScript('empty_queue', [ $this->namespace, $queueName ]); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | public function purgeCommand(string $queueName, string $id) |
108 | 108 | { |
109 | - $this->evalScript('purge_message', [$this->namespace, $queueName, $id]); |
|
109 | + $this->evalScript('purge_message', [ $this->namespace, $queueName, $id ]); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | public function scheduleCommand(string $queueName, string $id, string $serialized, \DateTime $dateTime) |
113 | 113 | { |
114 | 114 | $this->evalScript( |
115 | 115 | 'schedule_message', |
116 | - [$this->namespace, $queueName, $id, $serialized, $dateTime->getTimestamp()] |
|
116 | + [ $this->namespace, $queueName, $id, $serialized, $dateTime->getTimestamp() ] |
|
117 | 117 | ); |
118 | 118 | } |
119 | 119 | |
@@ -181,12 +181,12 @@ discard block |
||
181 | 181 | |
182 | 182 | public function purgeNamespace() |
183 | 183 | { |
184 | - $this->evalScript('purge_namespace', [$this->namespace]); |
|
184 | + $this->evalScript('purge_namespace', [ $this->namespace ]); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | private function evalScript(string $script, array $args) |
188 | 188 | { |
189 | - $path = self::LUA_PATH . '/' . $script . '.lua'; |
|
189 | + $path = self::LUA_PATH.'/'.$script.'.lua'; |
|
190 | 190 | $lua = file_get_contents($path); |
191 | 191 | return $this->adapter->evalLua($lua, $args); |
192 | 192 | } |