BoatType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 9
c 1
b 0
f 0
dl 0
loc 13
ccs 0
cts 6
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLabel() 0 7 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 BoatType PROFESSIONAL()
11
 * @method static BoatType RECREATIONAL()
12
 * @method static BoatType STANDING_MAST()
13
 */
14
final class BoatType extends Enum
15
{
16
    private const PROFESSIONAL = 'PROFESSIONAL';
17
    private const RECREATIONAL = 'RECREATIONAL';
18
    private const STANDING_MAST = 'STANDING_MAST';
19
20
    public function getLabel(): string
21
    {
22
        return [
23
            'PROFESSIONAL' => 'Beroepsvaart',
24
            'RECREATIONAL' => 'Recreatie',
25
            'STANDING_MAST' => 'Staande mast',
26
        ][$this->getKey()];
27
    }
28
}
29