| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.2098 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 1 | public function fetch() |
|
| 20 | { |
||
| 21 | 1 | $response = $this->httpGet('/settings'); |
|
| 22 | 1 | if (!$this->hydrator) { |
|
| 23 | return $response; |
||
| 24 | } |
||
| 25 | // Use any valid status code here |
||
| 26 | 1 | if ($response->getStatusCode() !== 200) { |
|
| 27 | $this->handleErrors($response); |
||
| 28 | } |
||
| 29 | |||
| 30 | 1 | return $this->hydrator->hydrate($response, Setting::class); |
|
| 31 | } |
||
| 32 | |||
| 52 |