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

Weapon::getDamage()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 1
c 2
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
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 4
    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 4
        parent::__construct($name, $description, $sellValue, $buyValue);
24 4
    }
25
26 3
    public function getType(): WeaponType
27
    {
28 3
        return $this->type;
29
    }
30
31 3
    public function getDamage(): Damage
32
    {
33 3
        return $this->damage;
34
    }
35
}
36