RoadAuthorityType::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 11
c 3
b 0
f 0
dl 0
loc 13
ccs 0
cts 12
cp 0
rs 9.9
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 RoadAuthorityType MUNICIPALITY()
11
 * @method static RoadAuthorityType SUBMUNICIPALITY()
12
 * @method static RoadAuthorityType ROAD_AUTHORITY()
13
 * @method static RoadAuthorityType TUNNEL_AUTHORITY()
14
 * @method static RoadAuthorityType WATER_AUTHORITY()
15
 * @method static RoadAuthorityType POLDER_AUTHORITY()
16
 * @method static RoadAuthorityType PROVINCE()
17
 * @method static RoadAuthorityType MISCELLANEOUS()
18
 * @method static RoadAuthorityType UNKNOWN()
19
 */
20
final class RoadAuthorityType extends Enum
21
{
22
    private const MUNICIPALITY = 'MUNICIPALITY';
23
    private const SUBMUNICIPALITY = 'SUBMUNICIPALITY';
24
    private const ROAD_AUTHORITY = 'ROAD_AUTHORITY';
25
    private const TUNNEL_AUTHORITY = 'TUNNEL_AUTHORITY';
26
    private const WATER_AUTHORITY = 'WATER_AUTHORITY';
27
    private const POLDER_AUTHORITY = 'POLDER_AUTHORITY';
28
    private const PROVINCE = 'PROVINCE';
29
    private const MISCELLANEOUS = 'MISCELLANEOUS';
30
    private const UNKNOWN = 'UNKNOWN';
31
32
    public function getLabel(): string
33
    {
34
        return [
35
            'MUNICIPALITY' => 'Gemeente',
36
            'SUBMUNICIPALITY' => 'Stadsdeel',
37
            'ROAD_AUTHORITY' => 'Wegendistrict',
38
            'TUNNEL_AUTHORITY' => 'Tunnelbeheerder',
39
            'WATER_AUTHORITY' => 'Waterschap',
40
            'POLDER_AUTHORITY' => 'Hoogheemraadschap',
41
            'PROVINCE' => 'Provincie',
42
            'MISCELLANEOUS' => 'Diversen',
43
            'UNKNOWN' => 'Onbekend',
44
        ][$this->getKey()];
45
    }
46
}
47