| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class PriorityMiddleware implements PriorityMiddlewareInterface{ |
||
| 19 | |||
| 20 | protected MiddlewareInterface $middleware; |
||
| 21 | protected int $priority; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * PriorityMiddleware constructor. |
||
| 25 | */ |
||
| 26 | public function __construct(MiddlewareInterface $middleware, int $priority = null){ |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @inheritDoc |
||
| 33 | */ |
||
| 34 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler):ResponseInterface{ |
||
| 35 | return $this->middleware->process($request, $handler); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @inheritDoc |
||
| 40 | */ |
||
| 41 | public function getPriority():int{ |
||
| 43 | } |
||
| 44 | |||
| 46 |