ActivityType::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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 ActivityType WORK()
11
 * @method static ActivityType EVENT()
12
 * @method static ActivityType WATERWAY()
13
 * @method static ActivityType WATERWAY_EVENT()
14
 */
15
final class ActivityType extends Enum
16
{
17
    private const WORK = 'WORK';
18
    private const EVENT = 'EVENT';
19
    private const WATERWAY = 'WATERWAY';
20
    private const WATERWAY_EVENT = 'WATERWAY_EVENT';
21
22
    public function getLabel(): string
23
    {
24
        return [
25
            'WORK' => 'Werk',
26
            'EVENT' => 'Evenement',
27
            'WATERWAY' => 'Vaarweg werk',
28
            'WATERWAY_EVENT' => 'Vaarweg evenement',
29
        ][$this->getKey()];
30
    }
31
}
32