InstanceStateEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
ccs 2
cts 2
cp 1
crap 1
1
<?php
2
3
namespace Jalle19\StatusManager\Event;
4
5
use Jalle19\StatusManager\Configuration\Instance;
6
use Symfony\Component\EventDispatcher\Event;
7
8
/**
9
 * Represents an instance state event
10
 *
11
 * @package   Jalle19\StatusManager\Event
12
 * @copyright Copyright &copy; Sam Stenvall 2016-
13
 * @license   https://www.gnu.org/licenses/gpl.html The GNU General Public License v2.0
14
 */
15
class InstanceStateEvent extends Event
16
{
17
18
	/**
19
	 * @var Instance
20
	 */
21
	private $_instance;
22
23
24
	/**
25
	 * @param Instance $_instance
26
	 */
27 2
	public function __construct(Instance $_instance)
28
	{
29 2
		$this->_instance = $_instance;
30 2
	}
31
32
33
	/**
34
	 * @return Instance
35
	 */
36 1
	public function getInstance()
37
	{
38 1
		return $this->_instance;
39
	}
40
41
}
42