| @@ -11,10 +11,13 @@ discard block | ||
| 11 | 11 | use Psr\Http\Server\RequestHandlerInterface; | 
| 12 | 12 | |
| 13 | 13 |  class {class} extends BaseMiddleware implements MiddlewareInterface | 
| 14 | -<?php else: ?> | |
| 14 | +<?php else { | |
| 15 | + : ?> | |
| 15 | 16 | |
| 16 | 17 |  class {class} extends BaseMiddleware | 
| 17 | -<?php endif; ?> | |
| 18 | +<?php endif; | |
| 19 | +} | |
| 20 | +?> | |
| 18 | 21 |  { | 
| 19 | 22 | /** | 
| 20 | 23 | * Traitez une demande de serveur entrante. | 
| @@ -26,16 +29,22 @@ discard block | ||
| 26 | 29 | */ | 
| 27 | 30 | <?php if ($standard === 'psr15'): ?> | 
| 28 | 31 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface | 
| 29 | -<?php else: ?> | |
| 32 | +<?php else { | |
| 33 | + : ?> | |
| 30 | 34 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface | 
| 31 | -<?php endif; ?> | |
| 35 | +<?php endif; | |
| 36 | +} | |
| 37 | +?> | |
| 32 | 38 |      { | 
| 33 | 39 | // | 
| 34 | 40 | |
| 35 | 41 | <?php if ($standard === 'psr15'): ?> | 
| 36 | 42 | return $handler->handle($request); | 
| 37 | -<?php else: ?> | |
| 43 | +<?php else { | |
| 44 | + : ?> | |
| 38 | 45 | return $next($request, $response); | 
| 39 | -<?php endif; ?> | |
| 46 | +<?php endif; | |
| 47 | +} | |
| 48 | +?> | |
| 40 | 49 | } | 
| 41 | 50 | } |