Passed
Push — master ( 5a11dc...578008 )
by Janko
08:39
created

BuildMenuEnum   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 14
ccs 6
cts 6
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Component\Building;
6
7
enum BuildMenuEnum: int
8
{
9
    case BUILDMENU_SOCIAL = 1;
10
    case BUILDMENU_INDUSTRY = 2;
11
    case BUILDMENU_INFRASTRUCTURE = 3;
12
    case BUILDMENU_ENERGY = 4;
13
14 1
    public function getDescription(): string
15
    {
16 1
        return match ($this) {
17 1
            self::BUILDMENU_SOCIAL => _('Soziales'),
18 1
            self::BUILDMENU_INDUSTRY => _('Industrie'),
19 1
            self::BUILDMENU_INFRASTRUCTURE => _('Infrastruktur'),
20 1
            self::BUILDMENU_ENERGY => _('Energie'),
21 1
        };
22
    }
23
}
24