Completed
Pull Request — master (#32)
by Maximilian
05:43
created

Sequence::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\GadgetController;
4
5
/**
6
 * @author Maximilian Beckers <[email protected]>
7
 */
8
class Sequence
9
{
10
    /**
11
     * @var int|null
12
     */
13
    public $durationMs;
14
15
    /**
16
     * @var bool|null
17
     */
18
    public $blend;
19
20
    /**
21
     * @var string|null
22
     */
23
    public $color;
24
25
    /**
26
     * @param int    $durationMs
27
     * @param string $color
28
     * @param bool   $blend
29
     *
30
     * @return Parameters
31
     */
32
    public static function create(int $durationMs, string $color, bool $blend = false): self
33
    {
34
        $animations = new self();
35
36
        $animations->durationMs       = $durationMs;
37
        $animations->color            = $color;
38
        $animations->blend            = $blend;
39
40
        return $animations;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $animations returns the type MaxBeckers\AmazonAlexa\R...dgetController\Sequence which is incompatible with the documented return type MaxBeckers\AmazonAlexa\R...etController\Parameters.
Loading history...
41
    }
42
}
43