Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | use MediaWiki\Config\ServiceOptions; |
4 | use MediaWiki\Extension\ReportIncident\Services\ReportIncidentController; |
5 | use MediaWiki\Extension\ReportIncident\Services\ReportIncidentMailer; |
6 | use MediaWiki\Extension\ReportIncident\Services\ReportIncidentManager; |
7 | use MediaWiki\Logger\LoggerFactory; |
8 | use MediaWiki\MediaWikiServices; |
9 | |
10 | // PHP unit does not understand code coverage for this file |
11 | // as the @covers annotation cannot cover a specific file |
12 | // See ReportIncidentServiceWiringTest.php for relevant tests. |
13 | // @codeCoverageIgnoreStart |
14 | |
15 | return [ |
16 | 'ReportIncidentManager' => static function ( |
17 | MediaWikiServices $services |
18 | ): ReportIncidentManager { |
19 | return new ReportIncidentManager( |
20 | $services->getService( 'ReportIncidentMailer' ) |
21 | ); |
22 | }, |
23 | 'ReportIncidentMailer' => static function ( |
24 | MediaWikiServices $services |
25 | ): ReportIncidentMailer { |
26 | return new ReportIncidentMailer( |
27 | new ServiceOptions( ReportIncidentMailer::CONSTRUCTOR_OPTIONS, $services->getMainConfig() ), |
28 | $services->getUrlUtils(), |
29 | $services->getTitleFactory(), |
30 | $services->getMessageFormatterFactory()->getTextFormatter( |
31 | $services->getContentLanguage()->getCode() |
32 | ), |
33 | $services->getEmailer(), |
34 | LoggerFactory::getInstance( 'ReportIncident' ) |
35 | ); |
36 | }, |
37 | 'ReportIncidentController' => static function ( |
38 | MediaWikiServices $services |
39 | ): ReportIncidentController { |
40 | return new ReportIncidentController( $services->getMainConfig() ); |
41 | } |
42 | ]; |
43 | // @codeCoverageIgnoreEnd |