Failed Conditions
Push — master ( 2be5da...8667b1 )
by Adrien
04:39
created

Relationship   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 9 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 Relationship: string implements LocalizedPhpEnumType
10
{
11
    case Householder = 'householder';
12
    case Partner = 'partner';
13
    case Child = 'child';
14
    case Parent = 'parent';
15
    case Sister = 'sister';
16
    case Brother = 'brother';
17
18 1
    public function getDescription(): string
19
    {
20 1
        return match ($this) {
21 1
            self::Householder => 'Chef(e) de famille',
22 1
            self::Partner => 'Conjoint',
23 1
            self::Child => 'Enfant',
24 1
            self::Parent => 'Parent',
25 1
            self::Sister => 'Soeur',
26 1
            self::Brother => 'Frère',
27 1
        };
28
    }
29
}
30