Total Complexity | 7 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class ChangelogConfig |
||
12 | { |
||
13 | private const ROOT_URL = 'https://api.github.com'; |
||
14 | |||
15 | /** @var string */ |
||
16 | private $user; |
||
17 | |||
18 | /** @var string */ |
||
19 | private $repository; |
||
20 | |||
21 | /** @var string */ |
||
22 | private $milestone; |
||
23 | |||
24 | /** @var string[] */ |
||
25 | private $labels; |
||
26 | |||
27 | /** |
||
28 | * @param string[] $labels |
||
29 | */ |
||
30 | 14 | public function __construct( |
|
31 | string $user, |
||
32 | string $repository, |
||
33 | string $milestone, |
||
34 | array $labels |
||
35 | ) { |
||
36 | 14 | $this->user = $user; |
|
37 | 14 | $this->repository = $repository; |
|
38 | 14 | $this->milestone = $milestone; |
|
39 | 14 | $this->labels = $labels; |
|
40 | 14 | } |
|
41 | |||
42 | 1 | public function getUser() : string |
|
43 | { |
||
44 | 1 | return $this->user; |
|
45 | } |
||
46 | |||
47 | 1 | public function getRepository() : string |
|
48 | { |
||
49 | 1 | return $this->repository; |
|
50 | } |
||
51 | |||
52 | 2 | public function getMilestone() : string |
|
53 | { |
||
54 | 2 | return $this->milestone; |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return string[] |
||
59 | */ |
||
60 | 2 | public function getLabels() : array |
|
63 | } |
||
64 | |||
65 | 3 | public function getMilestoneIssuesUrl(string $label) : string |
|
66 | { |
||
67 | 3 | $query = urlencode(sprintf( |
|
78 |