| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 2 | public function process(ServerRequestInterface $req, RequestHandlerInterface $handler): ResponseInterface |
|
| 31 | {
|
||
| 32 | 2 | $method = $req->getMethod(); |
|
| 33 | |||
| 34 | 2 | if (isset($this->methods[$method])) |
|
| 35 | {
|
||
| 36 | 1 | return ($this->methods[$method])->process($req, $handler); |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | $req = $req->withAttribute(self::class, array_keys($this->methods)); |
|
| 40 | |||
| 41 | 1 | return $handler->handle($req); |
|
| 42 | } |
||
| 43 | } |