Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
MalformedBundle | |
0.00% |
0 / 5 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
getKey | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getParams | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | declare( strict_types = 1 ); |
3 | |
4 | namespace MediaWiki\Extension\Translate\MessageBundleTranslation; |
5 | |
6 | use Exception; |
7 | use MessageSpecifier; |
8 | use Throwable; |
9 | |
10 | /** |
11 | * @author Niklas Laxström |
12 | * @license GPL-2.0-or-later |
13 | * @since 2021.05 |
14 | */ |
15 | class MalformedBundle extends Exception implements MessageSpecifier { |
16 | private string $key; |
17 | private array $params; |
18 | |
19 | public function __construct( |
20 | string $key, |
21 | array $params = [], |
22 | ?Throwable $previous = null |
23 | ) { |
24 | parent::__construct( $key, 0, $previous ); |
25 | $this->key = $key; |
26 | $this->params = $params; |
27 | } |
28 | |
29 | /** @inheritDoc */ |
30 | public function getKey() { |
31 | return $this->key; |
32 | } |
33 | |
34 | /** @inheritDoc */ |
35 | public function getParams() { |
36 | return $this->params; |
37 | } |
38 | } |