Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
UserVisibleWarning | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
getMessageObj | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Extension\AbuseFilter\Parser\Exception; |
4 | |
5 | use Message; |
6 | |
7 | /** |
8 | * A variant of user-visible exception that is not fatal. |
9 | */ |
10 | class UserVisibleWarning extends UserVisibleException { |
11 | /** |
12 | * @return Message |
13 | */ |
14 | public function getMessageObj(): Message { |
15 | // Give grep a chance to find the usages: |
16 | // abusefilter-parser-warning-match-empty-regex |
17 | return new Message( |
18 | 'abusefilter-parser-warning-' . $this->mExceptionID, |
19 | [ $this->mPosition, ...$this->mParams ] |
20 | ); |
21 | } |
22 | } |