PeriodStatus   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 15
c 1
b 0
f 0
dl 0
loc 19
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLabel() 0 10 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Swis\Melvin\Enums;
6
7
use MyCLabs\Enum\Enum;
8
9
/**
10
 * @method static PeriodStatus INITIAL()
11
 * @method static PeriodStatus PROBABLY_STARTED()
12
 * @method static PeriodStatus STARTED()
13
 * @method static PeriodStatus OVERRUNNING()
14
 * @method static PeriodStatus PROBABLY_ENDED()
15
 * @method static PeriodStatus ENDED()
16
 */
17
final class PeriodStatus extends Enum
18
{
19
    private const INITIAL = 'INITIAL';
20
    private const PROBABLY_STARTED = 'PROBABLY_STARTED';
21
    private const STARTED = 'STARTED';
22
    private const OVERRUNNING = 'OVERRUNNING';
23
    private const PROBABLY_ENDED = 'PROBABLY_ENDED';
24
    private const ENDED = 'ENDED';
25
26
    public function getLabel(): string
27
    {
28
        return [
29
            'INITIAL' => 'Initieel',
30
            'PROBABLY_STARTED' => 'Gestart',
31
            'STARTED' => 'Gestart',
32
            'OVERRUNNING' => 'Uitloop',
33
            'PROBABLY_ENDED' => 'Gestopt',
34
            'ENDED' => 'Gestopt',
35
        ][$this->getKey()];
36
    }
37
}
38