Completed
Push — master ( d37ad3...5c38af )
by Markus
15s queued 11s
created

Event::setRetries()   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
c 0
b 0
f 0
dl 0
loc 5
rs 10
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 int
14
     */
15
    protected $retries;
16
17
    /**
18
     * @var object
19
     */
20
    protected $payload;
21
22
    /**
23
     * @return string
24
     */
25
    public function getName(): string
26
    {
27
        return $this->name;
28
    }
29
30
    /**
31
     * @param string $name
32
     *
33
     * @return \Jellyfish\Event\EventInterface
34
     */
35
    public function setName(string $name): EventInterface
36
    {
37
        $this->name = $name;
38
39
        return $this;
40
    }
41
42
    /**
43
     * @return int
44
     */
45
    public function getRetries(): int
46
    {
47
        return $this->retries;
48
    }
49
50
    /**
51
     * @param int $retries
52
     *
53
     * @return \Jellyfish\Event\EventInterface
54
     */
55
    public function setRetries(int $retries): EventInterface
56
    {
57
        $this->retries = $retries;
58
59
        return $this;
60
    }
61
62
    /**
63
     * @return object
64
     */
65
    public function getPayload(): object
66
    {
67
        return $this->payload;
68
    }
69
70
    /**
71
     * @param object $payload
72
     *
73
     * @return \Jellyfish\Event\EventInterface
74
     */
75
    public function setPayload(object $payload): EventInterface
76
    {
77
        $this->payload = $payload;
78
79
        return $this;
80
    }
81
}
82