Completed
Push — master ( 6a09d7...558842 )
by Sam
04:37
created

SubscriptionStateChangeEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Jalle19\StatusManager\Event;
4
5
use Jalle19\StatusManager\Subscription\StateChange;
6
7
/**
8
 * Subscription state change 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 SubscriptionStateChangeEvent extends AbstractInstanceEvent
15
{
16
17
	/**
18
	 * @var StateChange
19
	 */
20
	private $_stateChange;
21
22
23
	/**
24
	 * SubscriptionStateChangeEvent constructor.
25
	 *
26
	 * @param string      $instanceName
27
	 * @param StateChange $stateChange
28
	 */
29
	public function __construct($instanceName, StateChange $stateChange)
30
	{
31
		parent::__construct($instanceName);
32
33
		$this->_stateChange = $stateChange;
34
	}
35
36
37
	/**
38
	 * @return StateChange
39
	 */
40
	public function getStateChange()
41
	{
42
		return $this->_stateChange;
43
	}
44
45
}
46