Direction::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 Direction A_B()
11
 * @method static Direction BOTH()
12
 */
13
final class Direction extends Enum
14
{
15
    private const A_B = 'A_B';
16
    private const BOTH = 'BOTH';
17
18
    public function getLabel(): string
19
    {
20
        return [
21
            'A_B' => 'Enkele richting',
22
            'BOTH' => 'Beide richtingen',
23
        ][$this->getKey()];
24
    }
25
}
26