Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 7 |
CRAP | |
0.00% |
0 / 1 |
WikimediaEditorTasksServices | |
0.00% |
0 / 7 |
|
0.00% |
0 / 7 |
56 | |
0.00% |
0 / 1 |
getInstance | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
wrap | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getCounterFactory | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getCounterDao | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getExtensionConfig | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getNameTableStore | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * This program is free software; you can redistribute it and/or modify |
4 | * it under the terms of the GNU General Public License as published by |
5 | * the Free Software Foundation; either version 2 of the License, or |
6 | * (at your option) any later version. |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | * |
13 | * You should have received a copy of the GNU General Public License along |
14 | * with this program; if not, write to the Free Software Foundation, Inc., |
15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
16 | * |
17 | * @file |
18 | */ |
19 | |
20 | namespace MediaWiki\Extension\WikimediaEditorTasks; |
21 | |
22 | use MediaWiki\Config\Config; |
23 | use MediaWiki\MediaWikiServices; |
24 | use MediaWiki\Storage\NameTableStore; |
25 | |
26 | class WikimediaEditorTasksServices { |
27 | |
28 | /** @var MediaWikiServices */ |
29 | private $services; |
30 | |
31 | /** |
32 | * @return WikimediaEditorTasksServices |
33 | */ |
34 | public static function getInstance(): WikimediaEditorTasksServices { |
35 | return new self( MediaWikiServices::getInstance() ); |
36 | } |
37 | |
38 | /** |
39 | * @param MediaWikiServices $services |
40 | * @return WikimediaEditorTasksServices |
41 | */ |
42 | public static function wrap( MediaWikiServices $services ): WikimediaEditorTasksServices { |
43 | return new self( $services ); |
44 | } |
45 | |
46 | /** |
47 | * @param MediaWikiServices $services |
48 | */ |
49 | public function __construct( MediaWikiServices $services ) { |
50 | $this->services = $services; |
51 | } |
52 | |
53 | /** |
54 | * @return CounterFactory |
55 | */ |
56 | public function getCounterFactory(): CounterFactory { |
57 | return $this->services->getService( 'WikimediaEditorTasksCounterFactory' ); |
58 | } |
59 | |
60 | /** |
61 | * @return CounterDao |
62 | */ |
63 | public function getCounterDao(): CounterDao { |
64 | return $this->services->getService( 'WikimediaEditorTasksCounterDao' ); |
65 | } |
66 | |
67 | /** |
68 | * @return Config |
69 | */ |
70 | public function getExtensionConfig(): Config { |
71 | return $this->services->getService( 'WikimediaEditorTasksConfig' ); |
72 | } |
73 | |
74 | /** |
75 | * @return NameTableStore |
76 | */ |
77 | public function getNameTableStore(): NameTableStore { |
78 | return $this->services->getService( 'WikimediaEditorTasksNameTableStore' ); |
79 | } |
80 | |
81 | } |