WolfEncounterEvent   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

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