Failed Conditions
Push — master ( b1d4df...5a9cf3 )
by David
04:05
created

UserType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Enum;
6
7
use Ecodev\Felix\Api\Enum\LocalizedPhpEnumType;
8
9
enum UserType: string implements LocalizedPhpEnumType
10
{
11
    /**
12
     * Someone who is a normal user, not part of AAI.
13
     */
14
    case Default = 'default';
15
16
    /**
17
     * Someone who log in via AAI system.
18
     */
19
    case Aai = 'aai';
20
21
    /**
22
     * Empty shell used for legacy.
23
     */
24
    case Legacy = 'legacy';
25
26 1
    public function getDescription(): string
27
    {
28 1
        return match ($this) {
29 1
            self::Default => 'Someone who is a normal user, with login/password in DILPS',
30 1
            self::Aai => 'Someone who log in via AAI system',
31 1
            self::Legacy => 'Empty shell used for legacy',
32 1
        };
33
    }
34
}
35