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 MediaWiki\Message\Message; |
| 6 | |
| 7 | /** |
| 8 | * A variant of user-visible exception that is not fatal. |
| 9 | */ |
| 10 | class UserVisibleWarning extends UserVisibleException { |
| 11 | |
| 12 | public function getMessageObj(): Message { |
| 13 | // Give grep a chance to find the usages: |
| 14 | // abusefilter-parser-warning-match-empty-regex |
| 15 | return new Message( |
| 16 | 'abusefilter-parser-warning-' . $this->mExceptionID, |
| 17 | [ $this->mPosition, ...$this->mParams ] |
| 18 | ); |
| 19 | } |
| 20 | } |