RestrictionType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLabel() 0 7 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 RestrictionType NONE()
11
 * @method static RestrictionType SPEED()
12
 * @method static RestrictionType COMPLETE()
13
 */
14
final class RestrictionType extends Enum
15
{
16
    private const NONE = 'NONE';
17
    private const SPEED = 'SPEED';
18
    private const COMPLETE = 'COMPLETE';
19
20
    public function getLabel(): string
21
    {
22
        return [
23
            'NONE' => 'Geen verkeersmaatregel noodzakelijk',
24
            'SPEED' => 'Snelheidsbeperking',
25
            'COMPLETE' => 'Afsluiting',
26
        ][$this->getKey()];
27
    }
28
}
29