Passed
Push — master ( d927fb...4715fc )
by Alexander
02:46
created

MissingTranslationEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 10
c 0
b 0
f 0
dl 0
loc 26
ccs 11
cts 11
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getLanguage() 0 3 1
A getMessage() 0 3 1
A getCategory() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Translator\Event;
6
7
/**
8
 * The event is thrown when translation is missing.
9
 */
10
final class MissingTranslationEvent
11
{
12
    private string $category;
13
    private string $language;
14
    private string $message;
15
16 13
    public function __construct(string $category, string $language, string $message)
17
    {
18 13
        $this->category = $category;
19 13
        $this->language = $language;
20 13
        $this->message = $message;
21 13
    }
22
23 1
    public function getCategory(): string
24
    {
25 1
        return $this->category;
26
    }
27
28 1
    public function getLanguage(): string
29
    {
30 1
        return $this->language;
31
    }
32
33 1
    public function getMessage(): string
34
    {
35 1
        return $this->message;
36
    }
37
}
38