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

Event   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 75
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 6
eloc 13
c 1
b 0
f 1
dl 0
loc 75
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setName() 0 5 1
A getPayload() 0 3 1
A getRetries() 0 3 1
A setRetries() 0 5 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 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