Passed
Push — master ( f3a3f5...74a63a )
by Paweł
02:58
created

DoubleClaw   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 3 1
A getDamage() 0 3 1
A getEffects() 0 3 1
A getDescription() 0 3 1
A getRequiredTalentPoints() 0 3 1
A getName() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Build\Talent\Natural;
6
7
use AardsGerds\Game\Build\Attribute\Damage;
8
use AardsGerds\Game\Build\Talent\Effect\EffectCollection;
9
use AardsGerds\Game\Build\Talent\Talent;
10
use AardsGerds\Game\Build\Talent\TalentPoints;
11
use AardsGerds\Game\Fight\NaturalAttack;
12
13
final class DoubleClaw implements NaturalAttack, Talent
14
{
15
    public function getEffects(): EffectCollection
16
    {
17
        return new EffectCollection([]);
18
    }
19
20
    public function getDamage(): Damage
21
    {
22
        return new Damage(10);
23
    }
24
25
    public static function getName(): string
26
    {
27
        return 'Double Claw';
28
    }
29
30
    public static function getDescription(): string
31
    {
32
        return 'Attack with double claws.';
33
    }
34
35
    public static function getRequiredTalentPoints(): TalentPoints
36
    {
37
        return new TalentPoints(0);
38
    }
39
40
    public function __toString(): string
41
    {
42
        return self::getName();
43
    }
44
}
45