Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
InvalidTitleStringException | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
getErrorMsgKey | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getErrorMsgParams | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare( strict_types=1 ); |
4 | |
5 | namespace MediaWiki\Extension\CampaignEvents\MWEntity; |
6 | |
7 | use RuntimeException; |
8 | |
9 | class InvalidTitleStringException extends RuntimeException { |
10 | private string $errorMsgKey; |
11 | private array $errorMsgParams; |
12 | |
13 | /** |
14 | * @param string $titleString |
15 | * @param string $errorMsgKey |
16 | * @param array $errorMsgParams |
17 | */ |
18 | public function __construct( string $titleString, string $errorMsgKey, array $errorMsgParams ) { |
19 | parent::__construct( "Invalid title string: `$titleString`. Details msg key: $errorMsgKey" ); |
20 | $this->errorMsgKey = $errorMsgKey; |
21 | $this->errorMsgParams = $errorMsgParams; |
22 | } |
23 | |
24 | /** |
25 | * @return string |
26 | */ |
27 | public function getErrorMsgKey(): string { |
28 | return $this->errorMsgKey; |
29 | } |
30 | |
31 | /** |
32 | * @return array |
33 | */ |
34 | public function getErrorMsgParams(): array { |
35 | return $this->errorMsgParams; |
36 | } |
37 | } |