Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 6 |
CRAP | |
0.00% |
0 / 1 |
MessageBundleMetadata | |
0.00% |
0 / 10 |
|
0.00% |
0 / 6 |
42 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |||
getSourceLanguageCode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPriorityLanguages | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
areOnlyPriorityLanguagesAllowed | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getDescription | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLabel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace MediaWiki\Extension\Translate\MessageBundleTranslation; |
5 | |
6 | /** |
7 | * Represents metadata for a message bundle |
8 | * @author Abijeet Patro |
9 | * @since 2022.05 |
10 | * @license GPL-2.0-or-later |
11 | */ |
12 | class MessageBundleMetadata { |
13 | private ?string $sourceLanguageCode; |
14 | private ?array $priorityLanguageCodes; |
15 | private bool $allowOnlyPriorityLanguages; |
16 | private ?string $description; |
17 | private ?string $label; |
18 | |
19 | public function __construct( |
20 | ?string $sourceLanguageCode, |
21 | ?array $priorityLanguageCodes, |
22 | bool $allowOnlyPriorityLanguages, |
23 | ?string $description, |
24 | ?string $label |
25 | ) { |
26 | $this->sourceLanguageCode = $sourceLanguageCode; |
27 | $this->priorityLanguageCodes = $priorityLanguageCodes; |
28 | $this->allowOnlyPriorityLanguages = $allowOnlyPriorityLanguages; |
29 | $this->description = $description; |
30 | $this->label = $label; |
31 | } |
32 | |
33 | public function getSourceLanguageCode(): ?string { |
34 | return $this->sourceLanguageCode; |
35 | } |
36 | |
37 | public function getPriorityLanguages(): ?array { |
38 | return $this->priorityLanguageCodes; |
39 | } |
40 | |
41 | public function areOnlyPriorityLanguagesAllowed(): bool { |
42 | return $this->allowOnlyPriorityLanguages; |
43 | } |
44 | |
45 | public function getDescription(): ?string { |
46 | return $this->description; |
47 | } |
48 | |
49 | public function getLabel(): ?string { |
50 | return $this->label; |
51 | } |
52 | } |