| Conditions | 2 |
| Paths | 2 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 57 | 1 | public function execute(InputInterface $input, OutputInterface $output) : int |
|
| 58 | { |
||
| 59 | 1 | $table = new Table($output); |
|
| 60 | 1 | $table->setStyle('box'); |
|
| 61 | |||
| 62 | 1 | $table->setHeaders([ |
|
| 63 | 1 | 'Name', |
|
| 64 | 'Host', |
||
| 65 | 'Verb', |
||
| 66 | 'Path', |
||
| 67 | ]); |
||
| 68 | |||
| 69 | 1 | foreach ($this->router->getRoutes() as $route) { |
|
| 70 | 1 | $table->addRow([ |
|
| 71 | 1 | $route->getName(), |
|
| 72 | 1 | $route->getHost() ?? 'ANY', |
|
| 73 | 1 | \implode(', ', $route->getMethods()), |
|
| 74 | 1 | path_plain($route->getPath()), |
|
| 75 | ]); |
||
| 76 | } |
||
| 77 | |||
| 78 | 1 | $table->render(); |
|
| 79 | |||
| 80 | 1 | return 0; |
|
| 81 | } |
||
| 83 |