MissingTranslationEvent::getLanguage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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
    /**
13
     * @param string $category Category of the missing translation.
14
     * @param string $language Language of the missing translation.
15
     * @param string $message Message of the missing translation.
16
     */
17 13
    public function __construct(private string $category, private string $language, private string $message)
18
    {
19 13
    }
20
21
    /**
22
     * @return string Category of the missing translation.
23
     */
24 1
    public function getCategory(): string
25
    {
26 1
        return $this->category;
27
    }
28
29
    /**
30
     * @return string Language of the missing translation.
31
     */
32 1
    public function getLanguage(): string
33
    {
34 1
        return $this->language;
35
    }
36
37
    /**
38
     * @return string Message of the missing translation.
39
     */
40 1
    public function getMessage(): string
41
    {
42 1
        return $this->message;
43
    }
44
}
45