Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 63.64% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
11 | class PopularChannelsRequest extends StatisticsRequest |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $_userName; |
||
18 | |||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | private $_limit; |
||
23 | |||
24 | |||
25 | /** |
||
26 | * PopularChannelsRequest constructor. |
||
27 | * |
||
28 | * @param \stdClass $parameters |
||
29 | */ |
||
30 | 2 | public function __construct($parameters) |
|
31 | { |
||
32 | 2 | parent::__construct(self::TYPE_POPULAR_CHANNELS_REQUEST, $parameters); |
|
33 | |||
34 | /* @var \stdClass $parameters */ |
||
35 | 1 | if (isset($parameters->limit)) |
|
36 | 1 | $this->_limit = $parameters->limit; |
|
37 | |||
38 | 1 | if (isset($parameters->userName)) |
|
39 | 1 | $this->_userName = $parameters->userName; |
|
40 | 1 | } |
|
41 | |||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | public function getUserName() |
||
47 | { |
||
48 | return $this->_userName; |
||
49 | } |
||
50 | |||
51 | |||
52 | /** |
||
53 | * @return int |
||
54 | */ |
||
55 | public function getLimit() |
||
58 | } |
||
59 | |||
60 | } |
||
61 |