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 | /** |
| 13 | * Convenience method for returning an instance without having to use new, for chaining. |
| 14 | */ |
| 15 | public static function wrap( MediaWikiServices $services ): self { |
| 16 | return new self( $services ); |
| 17 | } |
| 18 | |
| 19 | public function __construct( |
| 20 | private readonly MediaWikiServices $services, |
| 21 | ) { |
| 22 | } |
| 23 | |
| 24 | public function getQueryHelper(): ThanksQueryHelper { |
| 25 | return $this->services->get( 'ThanksQueryHelper' ); |
| 26 | } |
| 27 | |
| 28 | } |