Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
29 | { |
||
30 | $env = $request->getServerParams(); |
||
31 | if (isset($env['MAINTENANCE'])) { |
||
32 | return $this->renderer->render( |
||
33 | $this->response->withStatus(503)->withAddedHeader('Retry-After', $env['MAINTENANCE']), |
||
34 | 'maintenance.html' |
||
35 | ); |
||
36 | } |
||
37 | return $handler->handle($request); |
||
38 | } |
||
40 |