| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 41 | 3 | public function dispatch(Route $route, callable $next) |
|
| 42 | { |
||
| 43 | 3 | $action = $route->action(); |
|
| 44 | |||
| 45 | 3 | list($class, $method) = explode('@', $action['uses']); |
|
| 46 | |||
| 47 | 3 | if (!method_exists($instance = $this->container->make($class), $method)) { |
|
| 48 | 1 | throw new NotFoundHttpException; |
|
| 49 | } |
||
| 50 | |||
| 51 | 1 | $parameters = $this->resolver->resolve( |
|
| 52 | 1 | new ReflectionMethod($instance, $method), |
|
| 53 | 1 | $route->parameters() |
|
| 54 | ); |
||
| 55 | |||
| 56 | 1 | return $this->container->call([$instance, $method], $parameters); |
|
| 57 | } |
||
| 58 | } |
||
| 59 |