RestrictionType::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 6
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 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