GreatSword::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 7
dl 0
loc 17
ccs 5
cts 5
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Inventory\Weapon\GreatSword;
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 GreatSword extends Weapon
16
{
17 6
    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 6
        parent::__construct(
27 6
            $name,
28
            $description,
29
            $sellValue,
30
            $buyValue,
31 6
            WeaponType::greatSword(),
32
            $damage,
33 6
            WeaponMastery::greatSword($requiredWeaponMasteryLevel),
34
        );
35 6
    }
36
}
37