| Total Complexity | 5 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class IssueRepository |
||
| 14 | { |
||
| 15 | /** @var IssueFetcher */ |
||
| 16 | private $issueFetcher; |
||
| 17 | |||
| 18 | /** @var IssueFactory */ |
||
| 19 | private $issueFactory; |
||
| 20 | |||
| 21 | 1 | public function __construct(IssueFetcher $issueFetcher, IssueFactory $issueFactory) |
|
| 22 | { |
||
| 23 | 1 | $this->issueFetcher = $issueFetcher; |
|
| 24 | 1 | $this->issueFactory = $issueFactory; |
|
| 25 | 1 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @return Issue[] |
||
| 29 | */ |
||
| 30 | 1 | public function getMilestoneIssues(string $user, string $repository, string $milestone) : array |
|
| 47 | } |
||
| 48 | |||
| 49 | 1 | private function getTitle(string $title) : string |
|
| 50 | { |
||
| 51 | 1 | $title = htmlentities($title, ENT_COMPAT, 'UTF-8'); |
|
| 52 | 1 | $title = str_replace(['[', ']', '_'], ['[', '\', '_'], $title); |
|
| 53 | |||
| 54 | 1 | return $title; |
|
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @param string[] $labels |
||
| 59 | * |
||
| 60 | * @return string[] |
||
| 61 | */ |
||
| 62 | 1 | private function getLabels(array $labels) : array |
|
| 69 | } |
||
| 70 | } |
||
| 71 |