Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function resolve(ServerRequestInterface $serverRequest) |
||
38 | { |
||
39 | foreach ($this->routes as $route) { |
||
40 | if ($route->isHttpVerbAndPathAMatch($serverRequest->getMethod(), $serverRequest->getRequestTarget())) { |
||
41 | return $route; |
||
42 | } |
||
43 | } |
||
44 | |||
45 | throw new RouteNotFoundException('Route not found'); |
||
46 | } |
||
47 | } |
||
48 |