| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | 2 | private function applyRoutesPrefix(array $config): array |
|
| 31 | { |
||
| 32 | 2 | $routes =& $config['routes'] ?? []; |
|
| 33 | |||
| 34 | // Prepend the routes prefix to every path |
||
| 35 | 2 | foreach ($routes as $key => $route) { |
|
| 36 | 2 | ['path' => $path] = $route; |
|
| 37 | 2 | $routes[$key]['path'] = sprintf('%s%s', self::ROUTES_PREFIX, $path); |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | return $config; |
|
| 41 | } |
||
| 43 |