Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
TemplateDataMessageLocalizer | n/a |
0 / 0 |
n/a |
0 / 0 |
2 | n/a |
0 / 0 |
|||
__construct | n/a |
0 / 0 |
n/a |
0 / 0 |
1 | |||||
msg | n/a |
0 / 0 |
n/a |
0 / 0 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\TemplateData; |
4 | |
5 | use MediaWiki\Language\Language; |
6 | use MessageLocalizer; |
7 | |
8 | /** |
9 | * @license GPL-2.0-or-later |
10 | * @codeCoverageIgnore Trivial facade |
11 | */ |
12 | class TemplateDataMessageLocalizer implements MessageLocalizer { |
13 | |
14 | private Language $language; |
15 | |
16 | public function __construct( Language $language ) { |
17 | $this->language = $language; |
18 | } |
19 | |
20 | /** @inheritDoc */ |
21 | public function msg( $key, ...$params ) { |
22 | return wfMessage( $key, ...$params )->inLanguage( $this->language ); |
23 | } |
24 | |
25 | } |