MissingTranslationCategoryEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 2
c 1
b 0
f 0
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCategory() 0 3 1
A __construct() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Translator\Event;
6
7
/**
8
 * The event is thrown when translation category is missing.
9
 */
10
final class MissingTranslationCategoryEvent
11
{
12
    /**
13
     * @param string $category Category that is missing.
14
     */
15 3
    public function __construct(private string $category)
16
    {
17 3
    }
18
19
    /**
20
     * @return string Category that is missing.
21
     */
22 1
    public function getCategory(): string
23
    {
24 1
        return $this->category;
25
    }
26
}
27