| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 5 | public function getController() : Route |
|
| 24 | {
|
||
| 25 | 5 | assert(isset($this->app['request'])); |
|
| 26 | |||
| 27 | 5 | foreach ($this->app->getRoutes() as $route) {
|
|
| 28 | 4 | if ($matches = $this->app['RouteMatcher']->match($route)) {
|
|
| 29 | 3 | $this->app['request.matches'] = $matches; |
|
| 30 | 3 | $this->app['request.route'] = $route; |
|
| 31 | 4 | return $route; |
|
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 35 | 2 | throw new NotFoundHttpException('Resource controller not found');
|
|
| 36 | } |
||
| 37 | } |