Passed
Push — master ( 5f46e8...f05eff )
by Paweł
03:06
created

Potion::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 4
dl 0
loc 7
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Inventory\Alchemy\Potion;
6
7
use AardsGerds\Game\Inventory\Coin;
8
use AardsGerds\Game\Inventory\InventoryItem;
9
use AardsGerds\Game\Player\Player;
10
11
abstract class Potion extends InventoryItem
12
{
13
    public function __construct(
14
        string $name,
15
        string $description,
16
        Coin $sellValue,
17
        Coin $buyValue,
18
    ) {
19
        parent::__construct($name, $description, $sellValue, $buyValue);
20
    }
21
22
    abstract public function drink(Player $player): void;
23
}
24