| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | 1 | public function index(string $platform): array |
|
| 27 | { |
||
| 28 | 1 | $response = $this->client->get($this->buildPath($this->path . '/' . $platform . '/languages')); |
|
| 29 | 1 | $contents = $response->getBody()->getContents(); |
|
| 30 | 1 | $data = json_decode($contents, true); |
|
| 31 | |||
| 32 | 1 | $array = []; |
|
| 33 | 1 | foreach ($data['data'] as $object) { |
|
| 34 | 1 | $array[] = new Language($object); |
|
| 35 | } |
||
| 36 | |||
| 37 | 1 | return $array; |
|
| 38 | } |
||
| 55 | } |