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 | /** |
| 29 | * @return WikimediaEditorTasksServices |
| 30 | */ |
| 31 | public static function getInstance(): WikimediaEditorTasksServices { |
| 32 | return new self( MediaWikiServices::getInstance() ); |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * @param MediaWikiServices $services |
| 37 | * @return WikimediaEditorTasksServices |
| 38 | */ |
| 39 | public static function wrap( MediaWikiServices $services ): WikimediaEditorTasksServices { |
| 40 | return new self( $services ); |
| 41 | } |
| 42 | |
| 43 | public function __construct( private readonly MediaWikiServices $services ) { |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * @return CounterFactory |
| 48 | */ |
| 49 | public function getCounterFactory(): CounterFactory { |
| 50 | return $this->services->getService( 'WikimediaEditorTasksCounterFactory' ); |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * @return CounterDao |
| 55 | */ |
| 56 | public function getCounterDao(): CounterDao { |
| 57 | return $this->services->getService( 'WikimediaEditorTasksCounterDao' ); |
| 58 | } |
| 59 | |
| 60 | /** |
| 61 | * @return Config |
| 62 | */ |
| 63 | public function getExtensionConfig(): Config { |
| 64 | return $this->services->getService( 'WikimediaEditorTasksConfig' ); |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * @return NameTableStore |
| 69 | */ |
| 70 | public function getNameTableStore(): NameTableStore { |
| 71 | return $this->services->getService( 'WikimediaEditorTasksNameTableStore' ); |
| 72 | } |
| 73 | |
| 74 | } |