ShortSword   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 19
ccs 5
cts 5
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Inventory\Weapon\ShortSword;
6
7
use AardsGerds\Game\Build\Attribute\Damage;
8
use AardsGerds\Game\Build\Attribute\Strength;
9
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMastery;
10
use AardsGerds\Game\Build\Talent\WeaponMastery\WeaponMasteryLevel;
11
use AardsGerds\Game\Inventory\Coin;
12
use AardsGerds\Game\Inventory\Weapon\Weapon;
13
use AardsGerds\Game\Inventory\Weapon\WeaponType;
14
15
abstract class ShortSword extends Weapon
16
{
17 4
    public function __construct(
18
        string $name,
19
        string $description,
20
        Coin $sellValue,
21
        Coin $buyValue,
22
        Damage $damage,
23
        WeaponMasteryLevel $requiredWeaponMasteryLevel,
24
        protected Strength $requiredStrength,
25
    ) {
26 4
        parent::__construct(
27 4
            $name,
28
            $description,
29
            $sellValue,
30
            $buyValue,
31 4
            WeaponType::shortSword(),
32
            $damage,
33 4
            WeaponMastery::shortSword($requiredWeaponMasteryLevel),
34
        );
35 4
    }
36
}
37