Completed
Pull Request — master (#29)
by
unknown
26:31 queued 23:57
created

VideoCollection::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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