Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | trait Layers |
||
19 | { |
||
20 | /** |
||
21 | * @param Request $request |
||
22 | * @param Context $ctx |
||
23 | * @return Promised |
||
24 | */ |
||
25 | public function inbound($request, Context $ctx) : Promised |
||
26 | { |
||
27 | return async(function (Request $request) { |
||
28 | return $this->call($request); |
||
|
|||
29 | }, $ctx, $request); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param Response $response |
||
34 | * @param Context $ctx |
||
35 | * @return Response |
||
36 | */ |
||
37 | public function outbound($response, Context $ctx) |
||
38 | { |
||
39 | return $response; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param Throwable $e |
||
44 | * @param Context $ctx |
||
45 | * @throws Throwable |
||
46 | */ |
||
47 | public function exception(Throwable $e, Context $ctx) : void |
||
50 | } |
||
51 | } |
||
52 |