summaryrefslogtreecommitdiff
blob: 1d544894ee8e229eeb87c9009a5f03c008f633fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
 * @file
 * @author Niklas Laxström
 * @license GPL-2.0-or-later
 */

namespace MediaWiki\Extension\Translate\Validation;

/**
 * Value object.
 *
 * @newable
 * @since 2020.06
 */
class ValidationIssue {
	/** @var string */
	private $type;
	/** @var string */
	private $subType;
	/** @var string */
	private $messageKey;
	/** @var array */
	private $messageParams;

	/** @stable for calling */
	public function __construct(
		string $type,
		string $subType,
		string $messageKey,
		array $messageParams = []
	) {
		$this->type = $type;
		$this->subType = $subType;
		$this->messageKey = $messageKey;
		$this->messageParams = $messageParams;
	}

	public function type(): string {
		return $this->type;
	}

	public function subType(): string {
		return $this->subType;
	}

	public function messageKey(): string {
		return $this->messageKey;
	}

	public function messageParams(): array {
		return $this->messageParams;
	}
}