Passed
Push — master ( 56813c...ebb300 )
by Paweł
03:29
created

Weapon::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Inventory\Weapon;
6
7
use AardsGerds\Game\Build\Attribute\Damage;
8
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMastery;
9
use AardsGerds\Game\Inventory\Coin;
10
use AardsGerds\Game\Inventory\InventoryItem;
11
12
abstract class Weapon implements InventoryItem
13
{
14
    public function __construct(
15
        protected string $name,
16
        protected string $description,
17
        protected Coin $sellValue,
18
        protected WeaponType $type,
19
        protected Damage $damage,
20
        protected WeaponMastery $requiredWeaponMastery,
21
    ) {}
22
23
    public function getName(): string
24
    {
25
        return $this->name;
26
    }
27
28
    public function getDescription(): string
29
    {
30
        return $this->description;
31
    }
32
33
    public function getSellValue(): Coin
34
    {
35
        return $this->sellValue;
36
    }
37
38
    public function getType(): WeaponType
39
    {
40
        return $this->type;
41
    }
42
43
    public function getDamage(): Damage
44
    {
45
        return $this->damage;
46
    }
47
}
48