| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 35 | 1 | private function wrap(MiddlewareInterface $middleware, RequestHandlerInterface $handler): RequestHandlerInterface |
|
| 36 | { |
||
| 37 | return new class($middleware, $handler) implements RequestHandlerInterface { |
||
| 38 | private $middleware; |
||
| 39 | private $handler; |
||
| 40 | |||
| 41 | public function __construct(MiddlewareInterface $middleware, RequestHandlerInterface $handler) |
||
| 42 | { |
||
| 43 | 1 | $this->middleware = $middleware; |
|
| 44 | 1 | $this->handler = $handler; |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | public function handle(ServerRequestInterface $request): ResponseInterface |
|
| 48 | { |
||
| 49 | 1 | return $this->middleware->process($request, $this->handler); |
|
| 50 | } |
||
| 54 |