Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
27 | class CallableMiddleware implements MiddlewareInterface |
||
28 | { |
||
29 | |||
30 | /** |
||
31 | * The middleware callback |
||
32 | * |
||
33 | * @var callable |
||
34 | */ |
||
35 | private $callback; |
||
36 | |||
37 | /** |
||
38 | * Constructor of the class |
||
39 | * |
||
40 | * @param callable $callback |
||
41 | */ |
||
42 | 4 | public function __construct(callable $callback) |
|
45 | 4 | } |
|
46 | |||
47 | /** |
||
48 | * {@inheritDoc} |
||
49 | */ |
||
50 | 3 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface |
|
55 |