Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | public function handle(Request $request) : Response |
||
34 | { |
||
35 | if ($this->connection->isClosed()) { |
||
36 | $this->connection->open(); |
||
37 | } |
||
38 | |||
39 | $data = $this->packer->pack($request); |
||
40 | $data = $this->connection->send($data); |
||
41 | |||
42 | $response = $this->packer->unpack($data); |
||
43 | if (!$response->isError()) { |
||
44 | return $response; |
||
45 | } |
||
46 | |||
47 | throw RequestFailed::fromErrorResponse($response); |
||
48 | } |
||
60 |