Passed
Pull Request — master (#72)
by Omid
22:21
created

TranscodeCollection   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 34
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getTranscodes() 0 4 1
A setTranscodes() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace MovingImage\Client\VMPro\Collection;
6
7
use JMS\Serializer\Annotation as JMS;
8
use MovingImage\Meta\Interfaces\TranscodeInterface;
9
10
class TranscodeCollection
11
{
12
    /**
13
     * @var TranscodeInterface[]
14
     * @JMS\Type("array<MovingImage\Client\VMPro\Entity\Transcode>")
15
     */
16
    private $transcodes;
17
18
    /**
19
     * @param TranscodeInterface[] $transcodes
20
     */
21
    public function __construct(array $transcodes)
22
    {
23
        $this->transcodes = $transcodes;
24
    }
25
26
    /**
27
     * @return TranscodeInterface[]
28
     */
29
    public function getTranscodes(): array
30
    {
31
        return $this->transcodes;
32
    }
33
34
    /**
35
     * @param TranscodeInterface[] $transcodes
36
     */
37
    public function setTranscodes(array $transcodes): self
38
    {
39
        $this->transcodes = $transcodes;
40
41
        return $this;
42
    }
43
}
44