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

EtherumPotion::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
ccs 0
cts 6
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\Build\Attribute\Etherum;
8
use AardsGerds\Game\Inventory\Coin;
9
use AardsGerds\Game\Player\Player;
10
11
final class EtherumPotion extends Potion
12
{
13
    public function __construct()
14
    {
15
        parent::__construct(
16
            'Etherum Potion',
17
            'Alcohol solution with little Etherum in it. This potion will grant you 1 Etherum.',
18
            new Coin(100),
19
            new Coin(200),
20
        );
21
    }
22
23
    public function drink(Player $player): void
24
    {
25
        $player->getEtherum()->increaseBy(new Etherum(1));
26
    }
27
}
28