Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
6 / 6 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| CentralNoticeHookRunner | |
100.00% |
6 / 6 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| onCentralNoticeCampaignChange | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | use MediaWiki\HookContainer\HookContainer; |
| 4 | |
| 5 | /** |
| 6 | * This is a hook runner class, see docs/Hooks.md in core. |
| 7 | * @internal |
| 8 | */ |
| 9 | class CentralNoticeHookRunner implements |
| 10 | CentralNoticeCampaignChangeHook |
| 11 | { |
| 12 | |
| 13 | public function __construct( |
| 14 | private readonly HookContainer $hookContainer, |
| 15 | ) { |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * @inheritDoc |
| 20 | */ |
| 21 | public function onCentralNoticeCampaignChange( |
| 22 | $action, |
| 23 | $time, |
| 24 | $campaignName, |
| 25 | $user, |
| 26 | $beginSettings, |
| 27 | $endSettings, |
| 28 | $summary |
| 29 | ): void { |
| 30 | $this->hookContainer->run( |
| 31 | 'CentralNoticeCampaignChange', |
| 32 | [ $action, $time, $campaignName, $user, $beginSettings, $endSettings, $summary ], |
| 33 | [ 'abortable' => false ] |
| 34 | ); |
| 35 | } |
| 36 | } |