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

ExportStatus::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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 ExportStatus: string implements LocalizedPhpEnumType
10
{
11
    case Todo = 'todo';
12
    case InProgress = 'in_progress';
13
    case Done = 'done';
14
    case Errored = 'errored';
15
16 1
    public function getDescription(): string
17
    {
18 1
        return match ($this) {
19 1
            self::Todo => 'A faire',
20 1
            self::InProgress => 'En cours',
21 1
            self::Done => 'Terminé',
22 1
            self::Errored => 'Erreur',
23 1
        };
24
    }
25
}
26