Test Failed
Pull Request — master (#91)
by Sergei
02:55
created

IdMessageReader::getMessages()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Translator;
6
7
use RuntimeException;
8
9
/**
10
 * ID message reader returns ID as message and doesn't support getting all messages at once.
11
 */
12
final class IdMessageReader implements MessageReaderInterface
13
{
14
    public function getMessage(string $id, string $category, string $locale, array $parameters = []): string
15
    {
16
        return $id;
17
    }
18
19
    public function getMessages(string $category, string $locale): array
20
    {
21
        throw new RuntimeException('IdMessageReader doesn\'t support getting all messages at once.');
22
    }
23
}
24