Passed
Push — master ( a5abad...86f2cd )
by Janko
06:21
created

UserStateEnum::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
ccs 7
cts 7
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Stu\Module\PlayerSetting\Lib;
4
5
enum UserStateEnum: int
6
{
7
    case NEW = 0;
8
    case UNCOLONIZED = 1;
9
    case ACTIVE = 2;
10
    case ACCOUNT_VERIFICATION = 3;
11
    case COLONIZATION_SHIP = 4;
12
13 1
    public function getDescription(): string
14
    {
15 1
        return match ($this) {
16 1
            self::NEW => "NEU",
17 1
            self::UNCOLONIZED => "OHNE KOLONIEN",
18 1
            self::ACTIVE => "AKTIV",
19 1
            self::ACCOUNT_VERIFICATION => "ACCOUNT VERIFIKATION",
20 1
            self::COLONIZATION_SHIP => "KOLONISATIONS SCHIFF"
21 1
        };
22
    }
23
}
24