Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
65 | protected function get($endpoint = null) { |
||
66 | try { |
||
67 | $response = $this->client->get($endpoint); |
||
68 | } catch (BadResponseException $e) { |
||
69 | if($e->getCode() === '404') { |
||
70 | throw new NotFoundException('The ability skill ID of `' . $endpoint .'` does not exist.'); |
||
71 | } else { |
||
72 | throw new \Exception($e); |
||
73 | } |
||
74 | } |
||
75 | return json_decode($response->getBody()->getContents(), true); |
||
76 | } |
||
77 | } |
||
78 |