NetteEventItem   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 75
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 5
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 75
rs 10
ccs 14
cts 14
cp 1

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getClass() 0 4 1
A getEventClass() 0 4 1
A getEventName() 0 4 1
A getProperty() 0 4 1
A __construct() 0 7 1
1
<?php
2
3
/**
4
 * This file is part of Symnedi.
5
 * Copyright (c) 2014 Tomas Votruba (http://tomasvotruba.cz)
6
 */
7
8
namespace Symnedi\EventDispatcher\DI;
9
10
use Symnedi\EventDispatcher\Contract\DI\NetteEventItemInterface;
11
12
13
final class NetteEventItem implements NetteEventItemInterface
14
{
15
16
	/**
17
	 * @var string
18
	 */
19
	private $class;
20
21
	/**
22
	 * @var string
23
	 */
24
	private $property;
25
26
	/**
27
	 * @var string
28
	 */
29
	private $eventClass;
30
31
	/**
32
	 * @var string
33
	 */
34
	private $eventName;
35
36
37
	/**
38
	 * @param string $class
39
	 * @param string $property
40
	 * @param string $eventClass
41
	 * @param string $eventName
42
	 */
43 3
	public function __construct($class, $property, $eventClass, $eventName)
44
	{
45 3
		$this->class = $class;
46 3
		$this->property = $property;
47 3
		$this->eventClass = $eventClass;
48 3
		$this->eventName = $eventName;
49 3
	}
50
51
52
	/**
53
	 * {@inheritdoc}
54
	 */
55 3
	public function getClass()
56
	{
57 3
		return $this->class;
58
	}
59
60
61
	/**
62
	 * {@inheritdoc}
63
	 */
64 2
	public function getEventClass()
65
	{
66 2
		return $this->eventClass;
67
	}
68
69
70
	/**
71
	 * {@inheritdoc}
72
	 */
73 2
	public function getEventName()
74
	{
75 2
		return $this->eventName;
76
	}
77
78
79
	/**
80
	 * {@inheritdoc}
81
	 */
82 2
	public function getProperty()
83
	{
84 2
		return $this->property;
85
	}
86
87
}
88