EventX::getEventName()   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 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
ccs 2
cts 2
cp 1
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * File was created 19.03.2015 08:44
4
 *
5
 * @author Karsten J. Gerber <[email protected]>
6
 */
7
namespace PeekAndPoke\Component\Emitter;
8
9
/**
10
 * Event
11
 *
12
 * @author Karsten J. Gerber <[email protected]>
13
 */
14
class EventX implements Event
15
{
16
    /** @var string */
17
    private $eventName;
18
    /** @var mixed|null */
19
    private $payload;
20
21
    /**
22
     * @param string $eventName
23
     * @param mixed  $payload
24
     */
25 4
    public function __construct($eventName, $payload = null)
26
    {
27 4
        $this->eventName = $eventName;
28 4
        $this->payload = $payload;
29 4
    }
30
31
    /**
32
     * @return string
33
     */
34 3
    public function getEventName()
35
    {
36 3
        return $this->eventName;
37
    }
38
39
    /**
40
     * @return mixed
41
     */
42 2
    public function getPayload()
43
    {
44 2
        return $this->payload;
45
    }
46
}
47