ActivityType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLabel() 0 8 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 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