| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 61 | protected function retrieve(string $url, array $params = []): ?Model |
||
| 62 | { |
||
| 63 | $curl = $this->getClient()->curl_api($url, 'GET', $params); |
||
| 64 | |||
| 65 | if ($curl->isValid() && $curl->isJSON()) { |
||
| 66 | return ObjectFactory::make($this->getClient(), $curl->getJSON()); |
||
|
|
|||
| 67 | } |
||
| 68 | |||
| 69 | throw new ApiException($curl->getError()); |
||
| 70 | } |
||
| 72 |