Event::create()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 6
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MaxBeckers\AmazonAlexa\Response\Directives\GameEngine;
6
7
class Event
8
{
9
    public const REPORTS_HISTORY = 'history';
10
    public const REPORTS_MATCHES = 'matches';
11
    public const REPORTS_NOTHING = 'nothing';
12
13 1
    public function __construct(
14
        public array $meets = [],
15
        public ?array $fails = null,
16
        public ?string $reports = null,
17
        public ?bool $shouldEndInputHandler = null,
18
        public ?int $maximumInvocations = null,
19
        public ?int $triggerTimeMilliseconds = null
20
    ) {
21 1
    }
22
23 1
    public static function create(array $meets, bool $shouldEndInputHandler, ?array $fails = null, ?string $reports = null, ?int $maximumInvocations = null, ?int $triggerTimeMilliseconds = null): self
24
    {
25 1
        return new self($meets, $fails, $reports, $shouldEndInputHandler, $maximumInvocations, $triggerTimeMilliseconds);
26
    }
27
}
28