EventX   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 31
c 0
b 0
f 0
rs 10
ccs 8
cts 8
cp 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPayload() 0 3 1
A getEventName() 0 3 1
A __construct() 0 4 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