| Total Complexity | 6 | 
| Total Lines | 47 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php | ||
| 16 | class ServerReplier implements Layered | ||
| 17 | { | ||
| 18 | /** | ||
| 19 | * @param mixed $message | ||
| 20 | * @param Context $ctx | ||
| 21 | * @return mixed | ||
| 22 | */ | ||
| 23 | public function inbound($message, Context $ctx) | ||
| 24 |     { | ||
| 25 | return $message; | ||
| 26 | } | ||
| 27 | |||
| 28 | /** | ||
| 29 | * @param mixed $message | ||
| 30 | * @param Context $ctx | ||
| 31 | * @return mixed | ||
| 32 | */ | ||
| 33 | public function outbound($message, Context $ctx) | ||
| 34 |     { | ||
| 35 | $this->replying($ctx); | ||
| 36 | return $message; | ||
| 37 | } | ||
| 38 | |||
| 39 | /** | ||
| 40 | * @param Throwable $e | ||
| 41 | * @param Context $ctx | ||
| 42 | * @throws Throwable | ||
| 43 | */ | ||
| 44 | public function exception(Throwable $e, Context $ctx) | ||
| 45 |     { | ||
| 46 | $this->replying($ctx); | ||
| 47 | throw $e; | ||
| 48 | } | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @param Context $ctx | ||
| 52 | */ | ||
| 53 | private function replying(Context $ctx) : void | ||
| 63 | } | ||
| 64 | } | ||
| 65 | } | ||
| 66 |