Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | public function sendData($data) |
||
42 | { |
||
43 | $request = new Request( |
||
44 | 'GET', |
||
45 | $this->endpoint . '?' . http_build_query(['version' => $this->getVersion(), 'text' => $this->getText()]), |
||
46 | ['Authorization' => 'Basic ' . base64_encode($data['username'] . ':' . $data['password'])] |
||
47 | ); |
||
48 | |||
49 | try { |
||
50 | $response = $this->httpClient->send($request); |
||
51 | } catch (ClientException $e) { |
||
|
|||
52 | } |
||
53 | |||
54 | return $this->response = new ToneResponse($this, $response->getBody()); |
||
55 | } |
||
56 | } |
||
57 |