| Total Complexity | 7 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Issue |
||
| 10 | { |
||
| 11 | private const ISSUE_LINE_FORMAT = ' - [%d: %s](%s) thanks to @%s'; |
||
| 12 | |||
| 13 | /** @var int */ |
||
| 14 | private $number; |
||
| 15 | |||
| 16 | /** @var string */ |
||
| 17 | private $title; |
||
| 18 | |||
| 19 | /** @var string */ |
||
| 20 | private $url; |
||
| 21 | |||
| 22 | /** @var string */ |
||
| 23 | private $user; |
||
| 24 | |||
| 25 | /** @var string[] */ |
||
| 26 | private $labels = []; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string[] $labels |
||
| 30 | */ |
||
| 31 | 7 | public function __construct(int $number, string $title, string $url, string $user, array $labels) |
|
| 32 | { |
||
| 33 | 7 | $this->number = $number; |
|
| 34 | 7 | $this->title = $title; |
|
| 35 | 7 | $this->url = $url; |
|
| 36 | 7 | $this->user = $user; |
|
| 37 | 7 | $this->labels = $labels; |
|
| 38 | 7 | } |
|
| 39 | |||
| 40 | 2 | public function getNumber() : int |
|
| 41 | { |
||
| 42 | 2 | return $this->number; |
|
| 43 | } |
||
| 44 | |||
| 45 | 2 | public function getTitle() : string |
|
| 46 | { |
||
| 47 | 2 | return $this->title; |
|
| 48 | } |
||
| 49 | |||
| 50 | 2 | public function getUrl() : string |
|
| 53 | } |
||
| 54 | |||
| 55 | 2 | public function getUser() : string |
|
| 56 | { |
||
| 57 | 2 | return $this->user; |
|
| 58 | } |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return string[] |
||
| 62 | */ |
||
| 63 | 2 | public function getLabels() : array |
|
| 66 | } |
||
| 67 | |||
| 68 | 1 | public function render() : string |
|
| 69 | { |
||
| 70 | 1 | return sprintf( |
|
| 79 |