Conditions | 2 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
49 | public function sendRequest($body) |
||
50 | { |
||
51 | try { |
||
52 | $response = $this->client->request( |
||
53 | 'POST', |
||
54 | null, |
||
55 | [ |
||
56 | 'body' => $body |
||
57 | ] |
||
58 | ); |
||
59 | |||
60 | $body = $response->getBody()->getContents(); |
||
61 | } catch (RequestException $e) { |
||
62 | $body = $e->getResponse()->getBody()->getContents(); |
||
63 | } |
||
64 | |||
65 | return $body; |
||
66 | } |
||
67 | } |
||
68 |