MostActiveWatchersRequest::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 3
c 1
b 0
f 1
nc 2
nop 1
dl 0
loc 7
rs 10
ccs 0
cts 5
cp 0
crap 6
1
<?php
2
3
namespace Jalle19\StatusManager\Message\Request;
4
5
/**
6
 * Class MostActiveWatchersRequest
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 MostActiveWatchersRequest extends StatisticsRequest
12
{
13
14
	/**
15
	 * @var int
16
	 */
17
	private $_limit;
18
19
20
	/**
21
	 * PopularChannelsRequest constructor.
22
	 *
23
	 * @param \stdClass $parameters
24
	 */
25
	public function __construct($parameters)
26
	{
27
		parent::__construct(self::TYPE_MOST_ACTIVE_WATCHERS_REQUEST, $parameters);
28
29
		/* @var \stdClass $parameters */
30
		if (isset($parameters->limit))
31
			$this->_limit = $parameters->limit;
32
	}
33
34
35
	/**
36
	 * @return int
37
	 */
38
	public function getLimit()
39
	{
40
		return $this->_limit;
41
	}
42
43
}
44