| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 60 | 2 | public function run() |
|
| 61 | { |
||
| 62 | 2 | $queue = $this->context->argv->get(1); |
|
| 63 | 2 | if (!$queue) { |
|
| 64 | 1 | $this->stdio->outln('<<red>>No queue specified<<reset>>'); |
|
| 65 | 1 | return Status::USAGE; |
|
| 66 | } |
||
| 67 | |||
| 68 | 1 | while (call_user_func($this->listener)) { |
|
| 69 | 1 | $this->consumer->consume($queue); |
|
| 70 | 1 | } |
|
| 71 | 1 | return Status::SUCCESS; |
|
| 72 | } |
||
| 73 | } |
||
| 74 |
Let’s take a look at an example: