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

EtherumPotion   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A drink() 0 3 1
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