AreaType::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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