Passed
Pull Request — master (#33)
by Maximilian
03:06
created

StartInputHandlerDirective   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 13
dl 0
loc 43
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 11 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\GameEngine;
4
5
use MaxBeckers\AmazonAlexa\Response\Directives\Directive;
6
7
/**
8
 * @author Maximilian Beckers <[email protected]>
9
 */
10
class StartInputHandlerDirective extends Directive
11
{
12
    const TYPE = 'GameEngine.StartInputHandler';
13
14
    /**
15
     * @var int|null
16
     */
17
    public $timeout;
18
19
    /**
20
     * @var array
21
     */
22
    public $proxies = [];
23
24
    /**
25
     * @var Recognizer[]
26
     */
27
    public $recognizers = [];
28
29
    /**
30
     * @var Event[]
31
     */
32
    public $events = [];
33
34
    /**
35
     * @param int          $timeout
36
     * @param Recognizer[] $recognizers
37
     * @param Event[]      $events
38
     * @param array        $proxies
39
     *
40
     * @return StartInputHandlerDirective
41
     */
42
    public static function create(int $timeout, array $recognizers, array $events, array $proxies = []): self
43
    {
44
        $setLight = new self();
45
46
        $setLight->type        = self::TYPE;
47
        $setLight->timeout     = $timeout;
48
        $setLight->recognizers = $recognizers;
49
        $setLight->events      = $events;
50
        $setLight->proxies     = $proxies;
51
52
        return $setLight;
53
    }
54
}
55