Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4.016 |
Changes | 0 |
1 | <?php |
||
11 | 2 | protected function registerRoute($route, $name = null) |
|
12 | { |
||
13 | 2 | $action = isset($route['controller']) |
|
14 | ? "{$route['controller']}@{$route['action']}" |
||
15 | 2 | : $route['action']; |
|
16 | |||
17 | 2 | $router = $this->getRouter()->get($route['uri'], [ |
|
18 | 2 | 'as' => $name ?: $route['name'], |
|
19 | 2 | 'uses' => $action, |
|
20 | ]); |
||
21 | |||
22 | 2 | if (isset($route['middleware'])) { |
|
23 | 2 | $router->middleware($route['middleware']); |
|
24 | } |
||
25 | 2 | } |
|
26 | |||
37 |