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
 onGoogleNewsSitemap__Query
100.00% covered (success)
100.00%
4 / 4
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3// phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
4
5namespace MediaWiki\Extension\GoogleNewsSitemap\Hooks;
6
7use MediaWiki\HookContainer\HookContainer;
8
9/**
10 * This is a hook runner class, see docs/Hooks.md in core.
11 * @internal
12 */
13class HookRunner implements
14    GoogleNewsSitemapQueryHook
15{
16    private HookContainer $hookContainer;
17
18    public function __construct( HookContainer $hookContainer ) {
19        $this->hookContainer = $hookContainer;
20    }
21
22    /**
23     * @inheritDoc
24     */
25    public function onGoogleNewsSitemap__Query( array $params, array &$joins, array &$conditions, array &$tables ) {
26        return $this->hookContainer->run(
27            'GoogleNewsSitemap::Query',
28            [ $params, &$joins, &$conditions, &$tables ]
29        );
30    }
31}