Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
ExistingFilter
100.00% covered (success)
100.00%
2 / 2
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
 getID
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace MediaWiki\Extension\AbuseFilter\Filter;
4
5/**
6 * Variant of Filter for filters that are known to exist
7 */
8class ExistingFilter extends Filter {
9    /**
10     * @param Specs $specs
11     * @param Flags $flags
12     * @param callable|array[] $actions Array with params or callable that will return them
13     * @phan-param array[]|callable():array[] $actions
14     * @param LastEditInfo $lastEditInfo
15     * @param int $id
16     * @param int|null $hitCount
17     * @param bool|null $throttled
18     */
19    public function __construct(
20        Specs $specs,
21        Flags $flags,
22        $actions,
23        LastEditInfo $lastEditInfo,
24        int $id,
25        ?int $hitCount = null,
26        ?bool $throttled = null
27    ) {
28        parent::__construct( $specs, $flags, $actions, $lastEditInfo, $id, $hitCount, $throttled );
29    }
30
31    /**
32     * @return int
33     */
34    public function getID(): int {
35        return $this->id;
36    }
37}