Passed
Push — master ( 5f46e8...f05eff )
by Paweł
03:06
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 extends InventoryItem
13
{
14
    public function __construct(
15
        string $name,
16
        string $description,
17
        Coin $sellValue,
18
        Coin $buyValue,
19
        protected WeaponType $type,
20
        protected Damage $damage,
21
        protected WeaponMastery $requiredWeaponMastery,
22
    ) {
23
        parent::__construct($name, $description, $sellValue, $buyValue);
24
    }
25
26
    public function getType(): WeaponType
27
    {
28
        return $this->type;
29
    }
30
31
    public function getDamage(): Damage
32
    {
33
        return $this->damage;
34
    }
35
}
36