Completed
Pull Request — master (#29)
by
unknown
24:04
created

VideoCollection   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 65
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTotalCount() 0 4 1
A getVideos() 0 4 1
A setTotalCount() 0 6 1
A setVideos() 0 6 1
1
<?php
2
3
namespace MovingImage\Client\VMPro\Collection;
4
5
use MovingImage\Client\VMPro\Entity\Video;
6
use JMS\Serializer\Annotation as JMS;
7
use MovingImage\Meta\Interfaces\VideoInterface;
8
9
class VideoCollection
10
{
11
    /**
12
     * @var int
13
     * @JMS\Type("integer")
14
     * @JMS\SerializedName("totalCount")
15
     */
16
    private $totalCount;
17
18
    /**
19
     * @var VideoInterface[]
20
     * @JMS\Type("array<MovingImage\Client\VMPro\Entity\Video>")
21
     */
22
    private $videos;
23
24
    /**
25
     * @param int     $totalCount
26
     * @param VideoInterface[] $videos
27
     */
28
    public function __construct($totalCount, array $videos)
29
    {
30
        $this->totalCount = $totalCount;
31
        $this->videos = $videos;
32
    }
33
34
    /**
35
     * @return int
36
     */
37
    public function getTotalCount()
38
    {
39
        return $this->totalCount;
40
    }
41
42
    /**
43
     * @return VideoInterface[]
44
     */
45
    public function getVideos()
46
    {
47
        return $this->videos;
48
    }
49
50
    /**
51
     * @param int $totalCount
52
     *
53
     * @return VideoCollection
54
     */
55
    public function setTotalCount(int $totalCount)
56
    {
57
        $this->totalCount = $totalCount;
58
59
        return $this;
60
    }
61
62
    /**
63
     * @param VideoInterface[] $videos
64
     *
65
     * @return VideoCollection
66
     */
67
    public function setVideos(array $videos)
68
    {
69
        $this->videos = $videos;
70
71
        return $this;
72
    }
73
}
74