| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class RouteList implements Arrayable |
||
| 21 | { |
||
| 22 | /** @var array<integer, array<string, string>> */ |
||
| 23 | protected array $routes; |
||
| 24 | |||
| 25 | public function __construct() |
||
| 26 | { |
||
| 27 | $this->routes = $this->generate(); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function toArray(): array |
||
| 33 | } |
||
| 34 | |||
| 35 | public function headers(): array |
||
| 36 | { |
||
| 37 | return array_map(function (string $key): string { |
||
| 38 | return ucwords(str_replace('_', ' ', $key)); |
||
| 39 | }, array_keys($this->routes[0])); |
||
| 40 | } |
||
| 41 | |||
| 42 | protected function generate(): array |
||
| 47 | } |
||
| 48 | |||
| 49 | protected static function routeToListItem(Route $route): RouteListItem |
||
| 52 | } |
||
| 53 | } |
||
| 54 |