| Total Complexity | 2 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | final class CallableRequestHandler implements RequestHandlerInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var callable(ServerRequestInterface): ResponseInterface |
||
| 27 | * |
||
| 28 | * @readonly |
||
| 29 | */ |
||
| 30 | private $callback; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param callable(ServerRequestInterface): ResponseInterface $callback |
||
| 34 | */ |
||
| 35 | 6 | public function __construct(callable $callback) |
|
| 36 | { |
||
| 37 | 6 | $this->callback = $callback; |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @inheritDoc |
||
| 42 | */ |
||
| 43 | 5 | public function handle(ServerRequestInterface $request): ResponseInterface |
|
| 46 | } |
||
| 47 | } |
||
| 48 |