| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | 2 | public function get($id): Response |
|
| 40 | { |
||
| 41 | 2 | $response = $this->httpClient()->get($this->baseUrl() . "/{$id}"); |
|
| 42 | |||
| 43 | 2 | if (!$response->ok() || $response->json('responseCode') != 200) { |
|
| 44 | 1 | throw new WorkcastException('Request error', $response->status()); |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | return $response; |
|
| 48 | } |
||
| 52 |