Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
ValidationIssue | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
30 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
type | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
subType | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
messageKey | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
messageParams | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * @file |
4 | * @author Niklas Laxström |
5 | * @license GPL-2.0-or-later |
6 | */ |
7 | |
8 | namespace MediaWiki\Extension\Translate\Validation; |
9 | |
10 | /** |
11 | * Value object. |
12 | * |
13 | * @newable |
14 | * @since 2020.06 |
15 | */ |
16 | class ValidationIssue { |
17 | /** @var string */ |
18 | private $type; |
19 | /** @var string */ |
20 | private $subType; |
21 | /** @var string */ |
22 | private $messageKey; |
23 | /** @var array */ |
24 | private $messageParams; |
25 | |
26 | /** @stable for calling */ |
27 | public function __construct( |
28 | string $type, |
29 | string $subType, |
30 | string $messageKey, |
31 | array $messageParams = [] |
32 | ) { |
33 | $this->type = $type; |
34 | $this->subType = $subType; |
35 | $this->messageKey = $messageKey; |
36 | $this->messageParams = $messageParams; |
37 | } |
38 | |
39 | public function type(): string { |
40 | return $this->type; |
41 | } |
42 | |
43 | public function subType(): string { |
44 | return $this->subType; |
45 | } |
46 | |
47 | public function messageKey(): string { |
48 | return $this->messageKey; |
49 | } |
50 | |
51 | public function messageParams(): array { |
52 | return $this->messageParams; |
53 | } |
54 | } |