@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | public function produce() |
| 42 | 42 | { |
| 43 | - if(!isset($this->tasks[0])) { |
|
| 43 | + if (!isset($this->tasks[0])) { |
|
| 44 | 44 | throw new TaskException('You must add at least 1 Task before producing.'); |
| 45 | 45 | } |
| 46 | 46 | $this->queueWriter->write($this->tasks); |
@@ -20,12 +20,12 @@ |
||
| 20 | 20 | $this->queueReader = $queueReader; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function consume(callable $callback, $timeout=0) |
|
| 23 | + public function consume(callable $callback, $timeout = 0) |
|
| 24 | 24 | { |
| 25 | - while(true) { |
|
| 25 | + while (true) { |
|
| 26 | 26 | try { |
| 27 | 27 | $this->consumeOnce($callback, $timeout); |
| 28 | - } catch(TimeoutReaderException $e) { |
|
| 28 | + } catch (TimeoutReaderException $e) { |
|
| 29 | 29 | break; |
| 30 | 30 | } |
| 31 | 31 | } |