Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 24 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | use MediaWiki\Config\Config; |
4 | use MediaWiki\Logger\LoggerFactory; |
5 | use MediaWiki\MediaWikiServices; |
6 | use Popups\PopupsContext; |
7 | use Popups\PopupsGadgetsIntegration; |
8 | use Psr\Log\LoggerInterface; |
9 | |
10 | /** |
11 | * @codeCoverageIgnore |
12 | */ |
13 | return [ |
14 | 'Popups.Config' => static function ( MediaWikiServices $services ): Config { |
15 | return $services->getService( 'ConfigFactory' ) |
16 | ->makeConfig( PopupsContext::EXTENSION_NAME ); |
17 | }, |
18 | 'Popups.GadgetsIntegration' => static function ( MediaWikiServices $services ): PopupsGadgetsIntegration { |
19 | return new PopupsGadgetsIntegration( |
20 | $services->getService( 'Popups.Config' ), |
21 | ExtensionRegistry::getInstance() |
22 | ); |
23 | }, |
24 | 'Popups.Logger' => static function ( MediaWikiServices $services ): LoggerInterface { |
25 | return LoggerFactory::getInstance( PopupsContext::LOGGER_CHANNEL ); |
26 | }, |
27 | 'Popups.Context' => static function ( MediaWikiServices $services ): PopupsContext { |
28 | return new PopupsContext( |
29 | $services->getService( 'Popups.Config' ), |
30 | ExtensionRegistry::getInstance(), |
31 | $services->getService( 'Popups.GadgetsIntegration' ), |
32 | $services->getSpecialPageFactory(), |
33 | $services->getUserOptionsLookup() |
34 | ); |
35 | } |
36 | ]; |