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

VideoItem   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 26
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 1
1
<?php
2
3
namespace MaxBeckers\AmazonAlexa\Response\Directives\VideoApp;
4
5
/**
6
 * @author Maximilian Beckers <[email protected]>
7
 */
8
class VideoItem
9
{
10
    /**
11
     * @var string|null
12
     */
13
    public $source;
14
15
    /**
16
     * @var Metadata|null
17
     */
18
    public $metadata;
19
20
    /**
21
     * @param string        $source
22
     * @param Metadata|null $metadata
23
     *
24
     * @return VideoItem
25
     */
26
    public static function create(string $source, Metadata $metadata = null): self
27
    {
28
        $videoItem = new self();
29
30
        $videoItem->source   = $source;
31
        $videoItem->metadata = $metadata;
32
33
        return $videoItem;
34
    }
35
}
36