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

ChannelCollection::setTotalCount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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