Completed
Branch develop (c4337b)
by Romain
01:55
created

AbstractCallbackEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 56
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getSenderId() 0 4 1
A getRecipientId() 0 4 1
A getTimestamp() 0 4 1
1
<?php
2
namespace Kerox\Messenger\Callback;
3
4
abstract class AbstractCallbackEvent
5
{
6
7
    /**
8
     * @var string
9
     */
10
    protected $senderId;
11
12
    /**
13
     * @var string
14
     */
15
    protected $recipientId;
16
17
    /**
18
     * @var int
19
     */
20
    protected $timestamp;
21
22
    /**
23
     * AbstractCallbackEvent constructor.
24
     *
25
     * @param string $senderId
26
     * @param string $recipientId
27
     * @param int $timestamp
28
     */
29
    public function __construct(string $senderId, string $recipientId, int $timestamp)
30
    {
31
        $this->senderId = $senderId;
32
        $this->recipientId = $recipientId;
33
        $this->timestamp = $timestamp;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getSenderId(): string
40
    {
41
        return $this->senderId;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getRecipientId(): string
48
    {
49
        return $this->recipientId;
50
    }
51
52
    /**
53
     * @return int
54
     */
55
    public function getTimestamp(): int
56
    {
57
        return $this->timestamp;
58
    }
59
}