| Conditions | 3 |
| Paths | 4 |
| Total Lines | 28 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 50 | public function handle() |
||
| 51 | { |
||
| 52 | $table = new Table($this->output); |
||
| 53 | $table->setHeaders(array('#', 'Type', 'Name')); |
||
| 54 | |||
| 55 | $rows = []; |
||
| 56 | $nr = 1; |
||
| 57 | // Publishers |
||
| 58 | foreach (array_keys($this->container->getPublishers()) as $publisherName) { |
||
| 59 | $rows[] = [ |
||
| 60 | $nr, |
||
| 61 | "<options=bold;fg=yellow>Publisher</>", |
||
| 62 | $publisherName, |
||
| 63 | ]; |
||
| 64 | $nr++; |
||
| 65 | } |
||
| 66 | $rows[] = new TableSeparator(); |
||
| 67 | // Consumers |
||
| 68 | foreach (array_keys($this->container->getConsumers()) as $publisherName) { |
||
| 69 | $rows[] = [ |
||
| 70 | $nr, |
||
| 71 | "<options=bold;fg=cyan>Consumer</>", |
||
| 72 | $publisherName, |
||
| 73 | ]; |
||
| 74 | $nr++; |
||
| 75 | } |
||
| 76 | $table->setRows($rows); |
||
| 77 | $table->render(); |
||
| 78 | } |
||
| 80 |