Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
57 | 1 | public function get($path, array $options = []) |
|
58 | { |
||
59 | 1 | $options['headers'] = isset($options['headers']) ? $options['headers'] : []; |
|
60 | 1 | $options['headers']['User-Agent'] = $this->app_client; |
|
61 | |||
62 | 1 | $response = $this->client->request('GET', $this->host.$this->prefix.$path, $options); |
|
63 | |||
64 | 1 | $content = $response->getBody()->getContents(); |
|
65 | |||
66 | 1 | return json_decode($content, true); |
|
67 | } |
||
69 |