Failed Conditions
Push — master ( 3358c7...2378df )
by Sam
04:40
created

BookableStatus::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
rs 10
ccs 6
cts 6
cp 1
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 BookableStatus: string implements LocalizedPhpEnumType
10
{
11
    case New = 'new';
12
    case Active = 'active';
13
    case Inactive = 'inactive';
14
    case Archived = 'archived';
15
16 1
    public function getDescription(): string
17
    {
18 1
        return match ($this) {
19 1
            self::New => _tr('Nouveau'),
20 1
            self::Active => _tr('Actif'),
21 1
            self::Inactive => _tr('Inactif'),
22 1
            self::Archived => _tr('Archivé'),
23 1
        };
24
    }
25
}
26