Passed
Push — master ( a55f22...56813c )
by Paweł
02:35
created

WolfEncounterEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 13
ccs 0
cts 6
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Event\Story\FirstChapter\WolfEncounter;
6
7
use AardsGerds\Game\Entity\Beast\Animal\Wolf;
8
use AardsGerds\Game\Player\Player;
9
use AardsGerds\Game\Shared\IntegerValue;
10
use AardsGerds\Game\Event\DecisionCollection;
11
use AardsGerds\Game\Event\EncounterEvent;
12
use AardsGerds\Game\Event\Story\FirstChapter\FightWolf\FightWolfDecision;
13
14
final class WolfEncounterEvent extends EncounterEvent
15
{
16
    public function __construct(Player $player)
17
    {
18
        $subject = new Wolf();
19
20
        parent::__construct(
21
            new WolfEncounterContext(),
22
            new DecisionCollection([
23
                new FightWolfDecision(new IntegerValue(1), $player, $subject),
24
            ]),
25
            $player,
26
            $subject,
27
        );
28
    }
29
}
30