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