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