Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function execute(InputInterface $input, OutputInterface $output): int |
||
17 | { |
||
18 | $reflectionKernel = new ReflectionClass($this->kernel); |
||
19 | $routerReflection = $reflectionKernel->getProperty('router'); |
||
20 | /** @var Router $router */ |
||
21 | $router = $routerReflection->getValue($this->kernel); |
||
22 | |||
23 | $names = []; |
||
24 | foreach ($router->routes as $route) { |
||
25 | $names[] = $route->path; |
||
26 | } |
||
27 | |||
28 | $output->writeln($names); |
||
29 | |||
30 | return self::SUCCESS; |
||
31 | } |
||
32 | } |