Source   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 Source MELVIN()
11
 * @method static Source SPIN()
12
 * @method static Source LTC()
13
 */
14
final class Source extends Enum
15
{
16
    private const MELVIN = 'MELVIN';
17
    private const SPIN = 'SPIN';
18
    private const LTC = 'LTC';
19
20
    public function getLabel(): string
21
    {
22
        return [
23
            'MELVIN' => 'Melvin',
24
            'SPIN' => 'SPIN',
25
            'LTC' => 'LTC',
26
        ][$this->getKey()];
27
    }
28
}
29