Animation   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 33
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 9 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\GadgetController;
4
5
/**
6
 * @author Maximilian Beckers <[email protected]>
7
 */
8
class Animation
9
{
10
    /**
11
     * @var int|null
12
     */
13
    public $repeat;
14
15
    /**
16
     * @var array
17
     */
18
    public $targetLights = ['1'];
19
20
    /**
21
     * @var Sequence[]
22
     */
23
    public $sequence = [];
24
25
    /**
26
     * @param int        $repeat
27
     * @param array      $targetLights
28
     * @param Sequence[] $sequence
29
     *
30
     * @return Animation
31
     */
32 1
    public static function create(array $sequence, int $repeat = 1, array $targetLights = ['1']): self
33
    {
34 1
        $animations = new self();
35
36 1
        $animations->repeat       = $repeat;
37 1
        $animations->targetLights = $targetLights;
38 1
        $animations->sequence     = $sequence;
39
40 1
        return $animations;
41
    }
42
}
43