| Conditions | 3 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 7 | ||
| Bugs | 1 | Features | 4 |
| 1 | <?php |
||
| 55 | 3 | protected function tick($queue) |
|
| 56 | { |
||
| 57 | 3 | $message = $this->driver->dequeue($queue); |
|
| 58 | 3 | if (empty($message)) { |
|
| 59 | 1 | return true; |
|
| 60 | } |
||
| 61 | |||
| 62 | 2 | $command = unserialize($message); |
|
| 63 | try { |
||
| 64 | 2 | $this->event->acknowledge($command); |
|
| 65 | 2 | $this->command_bus->handle($command); |
|
| 66 | 1 | $this->event->finish($command); |
|
| 67 | 2 | } catch (Exception $exception) { |
|
| 68 | 1 | $this->event->reject($command, $exception); |
|
| 69 | } |
||
| 70 | |||
| 71 | 2 | return true; |
|
| 72 | } |
||
| 73 | } |
||
| 74 |