Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
ThanksServices | |
0.00% |
0 / 3 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
wrap | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getQueryHelper | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\Thanks; |
4 | |
5 | use MediaWiki\MediaWikiServices; |
6 | |
7 | /** |
8 | * Service container class for the Thanks extension. |
9 | */ |
10 | class ThanksServices { |
11 | |
12 | /** @var MediaWikiServices */ |
13 | private MediaWikiServices $services; |
14 | |
15 | /** |
16 | * Convenience method for returning an instance without having to use new, for chaining. |
17 | * @param MediaWikiServices $services |
18 | * @return self |
19 | */ |
20 | public static function wrap( MediaWikiServices $services ): self { |
21 | return new self( $services ); |
22 | } |
23 | |
24 | /** |
25 | * @param MediaWikiServices $services |
26 | */ |
27 | public function __construct( MediaWikiServices $services ) { |
28 | $this->services = $services; |
29 | } |
30 | |
31 | /** @return ThanksQueryHelper */ |
32 | public function getQueryHelper(): ThanksQueryHelper { |
33 | return $this->services->get( 'ThanksQueryHelper' ); |
34 | } |
35 | |
36 | } |