Impact::getLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 9
ccs 0
cts 8
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 Impact NONE()
11
 * @method static Impact LITTLE()
12
 * @method static Impact AVERAGE()
13
 * @method static Impact BIG()
14
 * @method static Impact HUGE()
15
 */
16
final class Impact extends Enum
17
{
18
    private const NONE = 'NONE';
19
    private const LITTLE = 'LITTLE';
20
    private const AVERAGE = 'AVERAGE';
21
    private const BIG = 'BIG';
22
    private const HUGE = 'HUGE';
23
24
    public function getLabel(): string
25
    {
26
        return [
27
            'NONE' => 'Geen hinder',
28
            'LITTLE' => 'Kleine hinder',
29
            'AVERAGE' => 'Matige hinder',
30
            'BIG' => 'Grote hinder',
31
            'HUGE' => 'Zeer grote hinder',
32
        ][$this->getKey()];
33
    }
34
}
35