Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare( strict_types = 1 ); |
||
49 | public function getMessage( string $key ): Message { |
||
50 | $this->grabWikiMessages(); |
||
51 | if ( !isset( self::$messages[ $key ] ) ) { |
||
52 | throw new MessageNotFoundException( "Message '$key' does not exist." ); |
||
53 | } |
||
54 | // @phan-suppress-next-line PhanTypeArraySuspiciousNullable |
||
55 | return new Message( self::$messages[$key] ); |
||
56 | } |
||
58 |