| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 33 | 2 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 34 | { |
||
| 35 | 2 | $queue = $input->getArgument('queue'); |
|
| 36 | try { |
||
| 37 | $this |
||
| 38 | 2 | ->getContainer() |
|
| 39 | 2 | ->get('innmind.amqp.client') |
|
| 40 | 2 | ->channel() |
|
| 41 | 2 | ->queue() |
|
| 42 | 2 | ->purge(new Purge($queue)); |
|
| 43 | 1 | } catch (UnexpectedFrame $e) { |
|
| 44 | 1 | $output->writeln(sprintf( |
|
| 45 | 1 | '<error>Purging <bg=green>%s</> failed</>', |
|
| 46 | 1 | $queue |
|
| 47 | )); |
||
| 48 | |||
| 49 | 1 | return 1; |
|
| 50 | } |
||
| 51 | 1 | } |
|
| 52 | } |
||
| 53 |