Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
68 | public function __invoke(Request $request): ?Response |
||
69 | { |
||
70 | $response = call_user_func_array($this->callback, [$request]); |
||
71 | if (is_null($response) || $response instanceof Response) { |
||
72 | return $response; |
||
73 | } |
||
74 | throw new InvalidCallback("Route callbacks must only return null or a subclass of alkemann\h2l\Response"); |
||
75 | } |
||
87 |