| Conditions | 4 |
| Paths | 3 |
| Total Lines | 27 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 1 | public function fetchMilestoneIssues(string $user, string $repository, string $milestone) : array |
|
| 27 | { |
||
| 28 | 1 | $url = $this->getMilestoneIssuesUrl($user, $repository, $milestone); |
|
| 29 | |||
| 30 | 1 | $issues = []; |
|
| 31 | |||
| 32 | 1 | while (true) { |
|
| 33 | 1 | $response = $this->issueClient->execute($url); |
|
| 34 | |||
| 35 | 1 | $body = $response->getBody(); |
|
| 36 | |||
| 37 | 1 | foreach ($body['items'] as $item) { |
|
| 38 | 1 | $issues[] = $item; |
|
| 39 | } |
||
| 40 | |||
| 41 | 1 | $nextUrl = $response->getNextUrl(); |
|
| 42 | |||
| 43 | 1 | if ($nextUrl !== null) { |
|
| 44 | 1 | $url = $nextUrl; |
|
| 45 | |||
| 46 | 1 | continue; |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | break; |
|
| 50 | } |
||
| 51 | |||
| 52 | 1 | return $issues; |
|
| 53 | } |
||
| 69 |