| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 1 | protected function execute(InputInterface $input, OutputInterface $output): int |
|
| 41 | { |
||
| 42 | 1 | $table = new Table($output); |
|
| 43 | |||
| 44 | 1 | $table->setHeaders([ |
|
| 45 | 1 | 'NAME', |
|
| 46 | 1 | 'PATH', |
|
| 47 | 1 | 'METHOD(S)', |
|
| 48 | 1 | ]); |
|
| 49 | |||
| 50 | 1 | foreach ($this->router->getRoutes() as $route) { |
|
| 51 | 1 | $table->addRow([ |
|
| 52 | 1 | $route->getName(), |
|
| 53 | 1 | $route->getPath(), |
|
| 54 | 1 | implode(', ', $route->getMethods()), |
|
| 55 | 1 | ]); |
|
| 56 | } |
||
| 57 | |||
| 58 | 1 | $table->render(); |
|
| 59 | |||
| 60 | 1 | return self::SUCCESS; |
|
| 61 | } |
||
| 63 |