ConnectionSeenEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 27
rs 10
ccs 0
cts 8
cp 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getConnection() 0 3 1
1
<?php
2
3
namespace Jalle19\StatusManager\Event;
4
5
use Jalle19\tvheadend\model\ConnectionStatus;
6
7
/**
8
 * Connection seen event
9
 *
10
 * @package   Jalle19\StatusManager\Event
11
 * @copyright Copyright &copy; Sam Stenvall 2016-
12
 * @license   https://www.gnu.org/licenses/gpl.html The GNU General Public License v2.0
13
 */
14
class ConnectionSeenEvent extends AbstractInstanceEvent
15
{
16
17
	/**
18
	 * @var ConnectionStatus
19
	 */
20
	private $_connection;
21
22
23
	/**
24
	 * @param string           $instanceName
25
	 * @param ConnectionStatus $connection
26
	 */
27
	public function __construct($instanceName, ConnectionStatus $connection)
28
	{
29
		parent::__construct($instanceName);
30
31
		$this->_connection = $connection;
32
	}
33
34
35
	/**
36
	 * @return ConnectionStatus
37
	 */
38
	public function getConnection()
39
	{
40
		return $this->_connection;
41
	}
42
43
}
44