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

Event::setPayload()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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