Completed
Pull Request — master (#45)
by Maximilian
03:21
created

Metadata::fromAmazonRequest()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 3
nc 4
nop 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\VideoApp;
4
5
/**
6
 * @author Maximilian Beckers <[email protected]>
7
 */
8
class Metadata
9
{
10
    /**
11
     * @var string|null
12
     */
13
    public $title;
14
15
    /**
16
     * @var string|null
17
     */
18
    public $subtitle;
19
20
    /**
21
     * @param string|null $title
22
     * @param string|null $subtitle
23
     *
24
     * @return Metadata
25
     */
26
    public static function create(string $title = null, string $subtitle = null): self
27
    {
28
        $metadata = new self();
29
30
        $metadata->title    = $title;
31
        $metadata->subtitle = $subtitle;
32
33
        return $metadata;
34
    }
35
}
36