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
 onFeaturedFeeds__getFeeds
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\FeaturedFeeds\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    FeaturedFeedsGetFeedsHook
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 onFeaturedFeeds__getFeeds( array &$feedDefs ) {
26        return $this->hookContainer->run(
27            'FeaturedFeeds::getFeeds',
28            [ &$feedDefs ]
29        );
30    }
31}