Passed
Push — master ( f8b788...97b7c6 )
by Paweł
03:13
created

Ascension   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 9
eloc 27
c 1
b 0
f 0
dl 0
loc 65
ccs 0
cts 18
cp 0
rs 10

9 Methods

Rating   Name   Duplication   Size   Complexity  
A seventhAscension() 0 3 1
A sixthAscension() 0 3 1
A firstAscension() 0 3 1
A eighthAscension() 0 3 1
A thirdAscension() 0 3 1
A fifthAscension() 0 3 1
A __toString() 0 3 1
A fourthAscension() 0 3 1
A secondAscension() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Build\Talent\SecretKnowledge;
6
7
use AardsGerds\Game\Shared\IntegerValue;
8
9
final class Ascension extends IntegerValue
10
{
11
    public const FIRST_ASCENSION = 1;
12
    public const SECOND_ASCENSION = 2;
13
    public const THIRD_ASCENSION = 3;
14
    public const FOURTH_ASCENSION = 4;
15
    public const FIFTH_ASCENSION = 5;
16
    public const SIXTH_ASCENSION = 6;
17
    public const SEVENTH_ASCENSION = 7;
18
    public const EIGHTH_ASCENSION = 8;
19
20
    private const STRING_VALUES = [
21
        self::FIRST_ASCENSION => 'First Ascension',
22
        self::SECOND_ASCENSION => 'Second Ascension',
23
        self::THIRD_ASCENSION => 'Third Ascension',
24
        self::FOURTH_ASCENSION => 'Fourth Ascension',
25
        self::FIFTH_ASCENSION => 'Fifth Ascension',
26
        self::SIXTH_ASCENSION => 'Sixth Ascension',
27
        self::SEVENTH_ASCENSION => 'Seventh Ascension',
28
        self::EIGHTH_ASCENSION => 'Eighth Ascension',
29
    ];
30
31
    public static function firstAscension(): self
32
    {
33
        return new self(self::FIRST_ASCENSION);
34
    }
35
36
    public static function secondAscension(): self
37
    {
38
        return new self(self::SECOND_ASCENSION);
39
    }
40
41
    public static function thirdAscension(): self
42
    {
43
        return new self(self::THIRD_ASCENSION);
44
    }
45
46
    public static function fourthAscension(): self
47
    {
48
        return new self(self::FOURTH_ASCENSION);
49
    }
50
51
    public static function fifthAscension(): self
52
    {
53
        return new self(self::FIFTH_ASCENSION);
54
    }
55
56
    public static function sixthAscension(): self
57
    {
58
        return new self(self::SIXTH_ASCENSION);
59
    }
60
61
    public static function seventhAscension(): self
62
    {
63
        return new self(self::SEVENTH_ASCENSION);
64
    }
65
66
    public static function eighthAscension(): self
67
    {
68
        return new self(self::EIGHTH_ASCENSION);
69
    }
70
71
    public function __toString(): string
72
    {
73
        return self::STRING_VALUES[$this->value];
74
    }
75
}
76