Passed
Push — master ( 888025...8927c7 )
by Paweł
03:33
created

MefadrielDialogEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 15
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 15
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 19
ccs 15
cts 15
cp 1
crap 1
rs 9.7666
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AardsGerds\Game\Event\Story\FirstChapter\MercenaryCamp\MeetMefadriel;
6
7
use AardsGerds\Game\Dialog\Consequence;
8
use AardsGerds\Game\Dialog\DialogOption;
9
use AardsGerds\Game\Dialog\DialogOptionCollection;
10
use AardsGerds\Game\Entity\Human\Mefadriel;
11
use AardsGerds\Game\Event\DecisionCollection;
12
use AardsGerds\Game\Event\DialogEvent;
13
14
final class MefadrielDialogEvent extends DialogEvent
15
{
16 1
    public function __construct(Mefadriel $mefadriel)
17
    {
18 1
        parent::__construct(
19 1
            new MefadrielDialogContext(),
20 1
            new DecisionCollection([]),
21
            $mefadriel,
22 1
            new DialogOption(
23 1
                'Hey, you. You are finally awake.',
24 1
                new DialogOptionCollection([
25 1
                    new DialogOption(
26 1
                        'Who are you?',
27 1
                        new DialogOptionCollection([
28 1
                            new DialogOption('My name is Mefadriel. I command this miserable camp.'),
29
                        ]),
30
                    ),
31 1
                    new DialogOption(
32 1
                        'I need your sword.',
33 1
                        new DialogOptionCollection([
34 1
                            new DialogOption('Take it.', null, Consequence::fight()),
35
                        ]),
36
                    ),
37
                ]),
38
            ),
39
        );
40 1
    }
41
}
42