AbstractInstanceEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 24
rs 10
ccs 0
cts 7
cp 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getInstance() 0 3 1
1
<?php
2
3
namespace Jalle19\StatusManager\Event;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
/**
8
 * Base class for all events that are tied to a specific instance
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
abstract class AbstractInstanceEvent extends Event
15
{
16
17
	/**
18
	 * @var string
19
	 */
20
	protected $_instance;
21
22
23
	/**
24
	 * @param string $_instance
25
	 */
26
	public function __construct($_instance)
27
	{
28
		$this->_instance = $_instance;
29
	}
30
31
32
	/**
33
	 * @return string
34
	 */
35
	public function getInstance()
36
	{
37
		return $this->_instance;
38
	}
39
40
}
41