Total Complexity | 4 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
8 | final class CallableController implements ControllerInterface |
||
9 | { |
||
10 | 12 | public static function fromCallable(\Closure $closure): self |
|
13 | } |
||
14 | |||
15 | 3 | public static function factoryFromCallable(\Closure $closure): callable |
|
19 | 3 | }; |
|
20 | } |
||
21 | |||
22 | 12 | private function __construct( |
|
23 | private readonly \Closure $closure |
||
24 | 12 | ) {} |
|
25 | |||
26 | 9 | public function execute(ServerRequestInterface $request): ResponseInterface |
|
29 | } |
||
30 | } |
||
31 |