Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| FilterNotFoundException | n/a |
0 / 0 |
n/a |
0 / 0 |
2 | n/a |
0 / 0 |
|||
| __construct | n/a |
0 / 0 |
n/a |
0 / 0 |
2 | |||||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\AbuseFilter\Filter; |
| 4 | |
| 5 | use Exception; |
| 6 | use Wikimedia\NormalizedException\INormalizedException; |
| 7 | use Wikimedia\NormalizedException\NormalizedExceptionTrait; |
| 8 | |
| 9 | /** |
| 10 | * @codeCoverageIgnore |
| 11 | */ |
| 12 | class FilterNotFoundException extends Exception implements INormalizedException { |
| 13 | use NormalizedExceptionTrait; |
| 14 | |
| 15 | public function __construct( int $filter, bool $global ) { |
| 16 | $this->normalizedMessage = $global |
| 17 | ? "Global filter {filter} does not exist" |
| 18 | : "Filter {filter} does not exist"; |
| 19 | $this->messageContext = [ 'filter' => $filter ]; |
| 20 | |
| 21 | parent::__construct( self::getMessageFromNormalizedMessage( $this->normalizedMessage, $this->messageContext ) ); |
| 22 | } |
| 23 | } |