Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
44 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
45 | { |
||
46 | $method = $request->getMethod(); |
||
47 | |||
48 | if (!array_key_exists($method, $this->methodMap)) { |
||
49 | throw new OAuth2Exception( |
||
50 | 405, |
||
51 | 'not_implemented', |
||
52 | sprintf('The method "%s" is not supported.', $method) |
||
53 | ); |
||
54 | } |
||
55 | |||
56 | $middleware = $this->methodMap[$method]; |
||
57 | |||
58 | return $middleware->process($request, $handler); |
||
59 | } |
||
60 | } |
||
61 |