Completed
Pull Request — master (#257)
by Éloi
01:56
created

MediaCommunity::setNbViews()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of the feed-io package.
4
 *
5
 * (c) Alexandre Debril <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace FeedIo\Feed\Item;
12
13
class MediaCommunity implements MediaCommunityInterface
14
{
15
    /**
16
     * @var float
17
     */
18
    protected $starRatingAverage;
19
20
    /**
21
     * @var int
22
     */
23
    protected $starRatingCount;
24
25
    /**
26
     * @var int
27
     */
28
    protected $starRatingMin;
29
30
    /**
31
     * @var int
32
     */
33
    protected $starRatingMax;
34
35
    /**
36
     * @var int
37
     */
38
    protected $nbViews;
39
40
    /**
41
     * @var int
42
     */
43
    protected $nbFavorites;
44
45
    /**
46
     * @var array
47
     */
48
    protected $tags = array();
49
50
    /**
51
     * @return float
52
     */
53 2
    public function getStarRatingAverage() : ?float
54
    {
55 2
        return $this->starRatingAverage;
56
    }
57
58
    /**
59
     * @param  float $starRatingAverage
60
     * @return MediaCommunityInterface
61
     */
62 3
    public function setStarRatingAverage(?float $starRatingAverage) : MediaCommunityInterface
63
    {
64 3
        $this->starRatingAverage = $starRatingAverage;
65
66 3
        return $this;
67
    }
68
69
    /**
70
     * @return int
71
     */
72 2
    public function getStarRatingCount() : ?int
73
    {
74 2
        return $this->starRatingCount;
75
    }
76
77
    /**
78
     * @param  int $starRatingCount
79
     * @return MediaCommunityInterface
80
     */
81 3
    public function setStarRatingCount(?int $starRatingCount) : MediaCommunityInterface
82
    {
83 3
        $this->starRatingCount = $starRatingCount;
84
85 3
        return $this;
86
    }
87
88
    /**
89
     * @return int
90
     */
91 2
    public function getStarRatingMin() : ?int
92
    {
93 2
        return $this->starRatingMin;
94
    }
95
96
    /**
97
     * @param  int $starRatingMin
98
     * @return MediaCommunityInterface
99
     */
100 3
    public function setStarRatingMin(?int $starRatingMin) : MediaCommunityInterface
101
    {
102 3
        $this->starRatingMin = $starRatingMin;
103
104 3
        return $this;
105
    }
106
107
    /**
108
     * @return int
109
     */
110 2
    public function getStarRatingMax() : ?int
111
    {
112 2
        return $this->starRatingMax;
113
    }
114
115
    /**
116
     * @param  int $starRatingMax
117
     * @return MediaCommunityInterface
118
     */
119 3
    public function setStarRatingMax(?int $starRatingMax) : MediaCommunityInterface
120
    {
121 3
        $this->starRatingMax = $starRatingMax;
122
123 3
        return $this;
124
    }
125
126
    /**
127
     * @return int
128
     */
129 2
    public function getNbViews() : ?int
130
    {
131 2
        return $this->nbViews;
132
    }
133
134
    /**
135
     * @param  int $nbViews
136
     * @return MediaCommunityInterface
137
     */
138 3
    public function setNbViews(?int $nbViews) : MediaCommunityInterface
139
    {
140 3
        $this->nbViews = $nbViews;
141
142 3
        return $this;
143
    }
144
145
    /**
146
     * @return int
147
     */
148 2
    public function getNbFavorites() : ?int
149
    {
150 2
        return $this->nbFavorites;
151
    }
152
153
    /**
154
     * @param  int $nbFavorites
155
     * @return MediaCommunityInterface
156
     */
157 3
    public function setNbFavorites(?int $nbFavorites) : MediaCommunityInterface
158
    {
159 3
        $this->nbFavorites = $nbFavorites;
160
161 3
        return $this;
162
    }
163
164
    /**
165
     * @return array
166
     */
167 2
    public function getTags() : array
168
    {
169 2
        return $this->tags;
170
    }
171
172
    /**
173
     * @param  array $tags
174
     * @return MediaCommunityInterface
175
     */
176 3
    public function setTags(array $tags) : MediaCommunityInterface
177
    {
178 3
        $this->tags = $tags;
179
180 3
        return $this;
181
    }
182
}
183