PersonType::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 5
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 PersonType CONTRACTOR()
11
 * @method static PersonType ROADAUTHORITY()
12
 */
13
final class PersonType extends Enum
14
{
15
    private const CONTRACTOR = 'CONTRACTOR';
16
    private const ROADAUTHORITY = 'ROADAUTHORITY';
17
18
    public function getLabel(): string
19
    {
20
        return [
21
            'CONTRACTOR' => 'Aannemer',
22
            'ROADAUTHORITY' => '(vaar)wegbeheerder',
23
        ][$this->getKey()];
24
    }
25
}
26