Passed
Push — master ( cdfe84...9137c7 )
by Paweł
21:48
created

LootWolfDecision::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Event\Story\FirstChapter\FightWolf;
6
7
use AardsGerds\Game\Entity\Beast\Animal\Wolf;
8
use AardsGerds\Game\Event\Decision;
9
use AardsGerds\Game\Event\Event;
10
use AardsGerds\Game\Player\Player;
11
12
final class LootWolfDecision extends Decision
13
{
14
    public function __construct(
15
        Player $player,
16
        private Wolf $wolf,
17
    ) {
18
        parent::__construct($player);
19
    }
20
21
    public function __invoke(): Event
22
    {
23
        return new FightWolfEvent($this->player, $this->wolf); // todo: change event
24
    }
25
26
    public function __toString()
27
    {
28
        return 'Loot wolf';
29
    }
30
}
31