Total Complexity | 4 |
Total Lines | 24 |
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 | 5 | public static function fromCallable(\Closure $closure): self |
|
13 | } |
||
14 | |||
15 | 1 | public static function factoryFromCallable(\Closure $closure): callable |
|
19 | 1 | }; |
|
20 | } |
||
21 | |||
22 | private \Closure $closure; |
||
23 | |||
24 | 5 | private function __construct(\Closure $closure) |
|
25 | { |
||
26 | 5 | $this->closure = $closure; |
|
27 | } |
||
28 | |||
29 | 4 | public function execute(ServerRequestInterface $request): ResponseInterface |
|
32 | } |
||
33 | } |
||
34 |