MostActiveWatchersRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
c 1
b 0
f 1
dl 0
loc 30
rs 10
ccs 0
cts 9
cp 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 2
A getLimit() 0 3 1
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