Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
HookRunner | |
100.00% |
5 / 5 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
onWikimediaEventsShouldSchemaEditAttemptStepOversample | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace WikimediaEvents\Hooks; |
4 | |
5 | use IContextSource; |
6 | use MediaWiki\HookContainer\HookContainer; |
7 | |
8 | /** |
9 | * This is a hook runner class, see docs/Hooks.md in core. |
10 | * @internal |
11 | */ |
12 | class HookRunner implements |
13 | WikimediaEventsShouldSchemaEditAttemptStepOversampleHook |
14 | { |
15 | private HookContainer $hookContainer; |
16 | |
17 | public function __construct( HookContainer $hookContainer ) { |
18 | $this->hookContainer = $hookContainer; |
19 | } |
20 | |
21 | /** |
22 | * @inheritDoc |
23 | */ |
24 | public function onWikimediaEventsShouldSchemaEditAttemptStepOversample( |
25 | IContextSource $context, |
26 | bool &$shouldOversample |
27 | ) { |
28 | return $this->hookContainer->run( |
29 | 'WikimediaEventsShouldSchemaEditAttemptStepOversample', |
30 | [ $context, &$shouldOversample ] |
31 | ); |
32 | } |
33 | } |