Completed
Push — master ( 9804ea...45188d )
by Sam
02:27
created

MostActiveWatchersRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 33
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
A getLimit() 0 4 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 string $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