Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
ProgressStatsTableFactory | |
0.00% |
0 / 10 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
newFromContext | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace MediaWiki\Extension\Translate\Statistics; |
5 | |
6 | use IContextSource; |
7 | use MediaWiki\Extension\Translate\MessageProcessing\MessageGroupMetadata; |
8 | use MediaWiki\Extension\Translate\Utilities\ConfigHelper; |
9 | use MediaWiki\Linker\LinkRenderer; |
10 | |
11 | /** |
12 | * @author Niklas Laxström |
13 | * @license GPL-2.0-or-later |
14 | * @since 2021.10 |
15 | */ |
16 | class ProgressStatsTableFactory { |
17 | private LinkRenderer $linkRenderer; |
18 | private ConfigHelper $configHelper; |
19 | private MessageGroupMetadata $messageGroupMetadata; |
20 | |
21 | public function __construct( |
22 | LinkRenderer $linkRenderer, |
23 | ConfigHelper $configHelper, |
24 | MessageGroupMetadata $messageGroupMetadata |
25 | ) { |
26 | $this->linkRenderer = $linkRenderer; |
27 | $this->configHelper = $configHelper; |
28 | $this->messageGroupMetadata = $messageGroupMetadata; |
29 | } |
30 | |
31 | public function newFromContext( IContextSource $contextSource ): StatsTable { |
32 | return new StatsTable( |
33 | $this->linkRenderer, |
34 | $this->configHelper, |
35 | $contextSource, |
36 | $contextSource->getLanguage(), |
37 | $this->messageGroupMetadata |
38 | ); |
39 | } |
40 | |
41 | } |