Completed
Push — master ( 2e6749...8bcd18 )
by Sam
02:24
created

PopularChannelsRequest::getUserName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Jalle19\StatusManager\Message\Request;
4
5
/**
6
 * Class PopularChannelsRequest
7
 * @package   Jalle19\StatusManager\Message\Request
8
 * @copyright Copyright &copy; Sam Stenvall 2016-
9
 * @license   https://www.gnu.org/licenses/gpl.html The GNU General Public License v2.0
10
 */
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 string $parameters
29
	 */
30
	public function __construct($parameters)
31
	{
32
		parent::__construct(self::TYPE_POPULAR_CHANNELS_REQUEST, $parameters);
33
34
		/* @var \stdClass $parameters */
35
		if (isset($parameters->limit))
36
			$this->_limit = $parameters->limit;
37
38
		if (isset($parameters->userName))
39
			$this->_userName = $parameters->userName;
40
	}
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()
56
	{
57
		return $this->_limit;
58
	}
59
60
}
61