Passed
Pull Request — master (#2257)
by Janko
10:11 queued 05:17
created

UserStateEnum   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
dl 0
loc 16
ccs 7
cts 7
cp 1
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 8 1
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