Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
StashedTranslation | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
30 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
getUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getTitle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getValue | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getMetadata | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace MediaWiki\Extension\Translate\TranslatorSandbox; |
5 | |
6 | use MediaWiki\Title\Title; |
7 | use User; |
8 | |
9 | /** |
10 | * Value object for stashed translation which you can construct. |
11 | * |
12 | * @author Niklas Laxström |
13 | * @license GPL-2.0-or-later |
14 | * @since 2013.06 (namespaced in 2020.11) |
15 | */ |
16 | class StashedTranslation { |
17 | /** @var User */ |
18 | protected $user; |
19 | /** @var Title */ |
20 | protected $title; |
21 | /** @var string */ |
22 | protected $value; |
23 | /** @var array|null */ |
24 | protected $metadata; |
25 | |
26 | public function __construct( User $user, Title $title, string $value, array $metadata = null ) { |
27 | $this->user = $user; |
28 | $this->title = $title; |
29 | $this->value = $value; |
30 | $this->metadata = $metadata; |
31 | } |
32 | |
33 | public function getUser(): User { |
34 | return $this->user; |
35 | } |
36 | |
37 | public function getTitle(): Title { |
38 | return $this->title; |
39 | } |
40 | |
41 | public function getValue(): string { |
42 | return $this->value; |
43 | } |
44 | |
45 | public function getMetadata(): ?array { |
46 | return $this->metadata; |
47 | } |
48 | } |