| Conditions | 2 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | 1 | public function getById(int $id): Season |
|
| 32 | { |
||
| 33 | try { |
||
| 34 | 1 | $response = $this->client->get(sprintf('%s/%s', self::RESOURCE, $id)); |
|
| 35 | |||
| 36 | 1 | return new Season(json_decode($response->getBody()->getContents(), true)); |
|
| 37 | 1 | } catch (GuzzleException $e) { |
|
| 38 | 1 | throw new Exception($e->getMessage()); |
|
| 39 | } |
||
| 60 |