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