Passed
Push — master ( 812b31...82efe3 )
by Paweł
02:52
created

Bite   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A getRequiredTalentPoints() 0 3 1
A __toString() 0 3 1
A getDamage() 0 3 1
A getEffects() 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 Bite implements NaturalAttack, Talent
14
{
15 1
    public function getEffects(): EffectCollection
16
    {
17 1
        return new EffectCollection([]);
18
    }
19
20 1
    public function getDamage(): Damage
21
    {
22 1
        return new Damage(5);
23
    }
24
25 1
    public static function getName(): string
26
    {
27 1
        return 'Bite';
28
    }
29
30
    public static function getDescription(): string
31
    {
32
        return 'Just a bite.';
33
    }
34
35
    public static function getRequiredTalentPoints(): TalentPoints
36
    {
37
        return new TalentPoints(0);
38
    }
39
40 1
    public function __toString(): string
41
    {
42 1
        return self::getName();
43
    }
44
}
45