Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| BabelServices | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| wrap | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getConfig | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Babel; |
| 4 | |
| 5 | use MediaWiki\Config\Config; |
| 6 | use MediaWiki\MediaWikiServices; |
| 7 | |
| 8 | class BabelServices { |
| 9 | |
| 10 | public function __construct( |
| 11 | private readonly MediaWikiServices $coreServices, |
| 12 | ) { |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * Static version of the constructor, for nicer syntax. |
| 17 | * @return static |
| 18 | */ |
| 19 | public static function wrap( MediaWikiServices $coreServices ) { |
| 20 | return new static( $coreServices ); |
| 21 | } |
| 22 | |
| 23 | public function getConfig(): Config { |
| 24 | return $this->coreServices->getService( 'Babel.Config' ); |
| 25 | } |
| 26 | } |