| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public static function getAllPadIds($apiKey, $host = 'http://localhost:9001') |
||
| 38 | { |
||
| 39 | $client = new Client($apiKey, $host); |
||
| 40 | |||
| 41 | try { |
||
| 42 | $response = $client->listAllPads(); |
||
| 43 | } catch (\Exception $e) { |
||
| 44 | return []; |
||
| 45 | } |
||
| 46 | |||
| 47 | if ($response->getCode() == Response::CODE_OK) { |
||
| 48 | return $response->getData()['padIDs']; |
||
| 49 | } else { |
||
| 50 | return []; |
||
| 51 | } |
||
| 52 | } |
||
| 53 | |||
| 76 |