| Conditions | 2 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 27 | 5 | public function listLangsInProject() |
|
| 28 | { |
||
| 29 | try { |
||
| 30 | 5 | $body = (new Client()) |
|
| 31 | 5 | ->request('GET', $this->urlBase . '/language/list?api_token=' . $this->apiKey . '&id=' . $this->projectId) |
|
| 32 | 5 | ->getBody(); |
|
| 33 | 5 | return json_decode($body)->languages; |
|
| 34 | 5 | } catch (\Exception $e) { |
|
| 35 | 5 | return []; |
|
| 36 | } |
||
| 75 | } |