Completed
Push — master ( c2ba48...1fd225 )
by Markus
14s queued 12s
created

Event   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 9
dl 0
loc 50
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 5 1
A getPayload() 0 3 1
A setPayload() 0 5 1
A getName() 0 3 1
1
<?php
2
3
namespace Jellyfish\Event;
4
5
class Event implements EventInterface
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $name;
11
12
    /**
13
     * @var object
14
     */
15
    protected $payload;
16
17
    /**
18
     * @return string
19
     */
20
    public function getName(): string
21
    {
22
        return $this->name;
23
    }
24
25
    /**
26
     * @param string $name
27
     *
28
     * @return \Jellyfish\Event\EventInterface
29
     */
30
    public function setName(string $name): EventInterface
31
    {
32
        $this->name = $name;
33
34
        return $this;
35
    }
36
37
    /**
38
     * @return object
39
     */
40
    public function getPayload(): object
41
    {
42
        return $this->payload;
43
    }
44
45
    /**
46
     * @param object $payload
47
     *
48
     * @return \Jellyfish\Event\EventInterface
49
     */
50
    public function setPayload(object $payload): EventInterface
51
    {
52
        $this->payload = $payload;
53
54
        return $this;
55
    }
56
}
57