| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | protected function getSites(): array |
||
| 46 | { |
||
| 47 | $api = $this->client->sites(); |
||
| 48 | $sites = []; |
||
| 49 | $page = 0; |
||
| 50 | |||
| 51 | while (true) { |
||
| 52 | $resp = $api->list(50, $page); |
||
| 53 | if (empty($resp['sites'])) { |
||
| 54 | break; |
||
| 55 | } |
||
| 56 | $sites = array_merge($sites, $resp['sites']); |
||
| 57 | ++$page; |
||
| 58 | } |
||
| 59 | |||
| 60 | return $sites; |
||
| 61 | } |
||
| 63 |