AreaType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

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