| Conditions | 2 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 70 | 16 | public function callSendAPI($uid, $data) |
|
| 71 | { |
||
| 72 | |||
| 73 | 16 | $data = $data + ['access_token' => $this->config['page_access_token']]; |
|
| 74 | |||
| 75 | try { |
||
| 76 | 16 | $res = $this->client->request('GET', $this->config['uri_open_graph'] . $uid, [ |
|
| 77 | 4 | 'query' => $data |
|
| 78 | 12 | ]); |
|
| 79 | |||
| 80 | 12 | return \GuzzleHttp\json_decode($res->getBody()->getContents()); |
|
| 81 | |||
| 82 | 4 | } catch (ClientException $e) { |
|
| 83 | 4 | throw new MessengerException(trans('messenger::errors.unable_to_load_user_profile'), 0, $e); |
|
| 84 | } |
||
| 85 | |||
| 86 | } |
||
| 87 | |||
| 88 | } |