Passed
Push — master ( 8ff4e3...ffee1f )
by Samuel
03:00
created

ClientVigilanceLevel::getTranslatedValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App\Domain\Client\Enum;
4
5
use App\Common\Trait\EnumToArray;
6
7
enum ClientVigilanceLevel: string
8
{
9
    use EnumToArray;
10
11
    case LOW = 'low';
12
    case MEDIUM = 'medium';
13
    case HIGH = 'high';
14
15
    /**
16
     * Get the enum case name that can be displayed by the frontend.
17
     *
18
     * @return string
19
     */
20 5
    public function getDisplayName(): string
21
    {
22 5
        return match ($this) {
23 5
            self::LOW => __('Low'),
24 5
            self::MEDIUM => __('Medium'),
25 5
            self::HIGH => __('High'),
26 5
        };
27
    }
28
}
29