Test Setup Failed
Push — develop ( c4d986...67288c )
by Romain
02:18
created

OptinEvent::getTimestamp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Kerox\Messenger\Callback;
3
4
use Kerox\Messenger\Model\Callback\Optin;
5
6
class OptinEvent extends AbstractCallbackEvent
7
{
8
9
    /**
10
     * @var int
11
     */
12
    protected $timestamp;
13
14
    /**
15
     * @var \Kerox\Messenger\Model\Callback\Optin
16
     */
17
    protected $optin;
18
19
    /**
20
     * OptinEvent constructor.
21
     *
22
     * @param string $senderId
23
     * @param string $recipientId
24
     * @param int $timestamp
25
     * @param \Kerox\Messenger\Model\Callback\Optin $optin
26
     */
27
    public function __construct(string $senderId, string $recipientId, int $timestamp, Optin $optin)
28
    {
29
        parent::__construct($senderId, $recipientId);
30
31
        $this->timestamp = $timestamp;
32
        $this->optin = $optin;
33
    }
34
35
    /**
36
     * @return int
37
     */
38
    public function getTimestamp(): int
39
    {
40
        return $this->timestamp;
41
    }
42
43
    /**
44
     * @return \Kerox\Messenger\Model\Callback\Optin
45
     */
46
    public function getOptin(): Optin
47
    {
48
        return $this->optin;
49
    }
50
}
51