Passed
Push — master ( 798624...f2c7f4 )
by Paweł
03:25
created

SecretKnowledge   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 38.46%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 7
c 1
b 0
f 0
dl 0
loc 30
ccs 5
cts 13
cp 0.3846
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A getName() 0 3 1
A getRequiredTalentPoints() 0 3 1
A __toString() 0 3 1
A __construct() 0 3 1
A getAscension() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Build\Talent\SecretKnowledge;
6
7
use AardsGerds\Game\Build\Talent\Talent;
8
use AardsGerds\Game\Build\Talent\TalentPoints;
9
use JetBrains\PhpStorm\Immutable;
10
11
#[Immutable]
12 1
final class SecretKnowledge implements Talent
13
{
14 1
    public function __construct(
15
        private Ascension $ascension,
16 1
    ) {}
17
18 1
    public function getAscension(): Ascension
19
    {
20 1
        return $this->ascension;
21
    }
22
23
    public static function getName(): string
24
    {
25
        return 'Secret Knowledge';
26
    }
27
28
    public static function getDescription(): string
29
    {
30
        return 'Also known as Etheurgy is some places. Art of Etherum wielding.';
31
    }
32
33
    public static function getRequiredTalentPoints(): TalentPoints
34
    {
35
        return new TalentPoints(6);
36
    }
37
38
    public function __toString(): string
39
    {
40
        return "Secret Knowledge at {$this->ascension}";
41
    }
42
}
43