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

PostbackEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 31
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getPostback() 0 4 1
1
<?php
2
namespace Kerox\Messenger\Callback;
3
4
use Kerox\Messenger\Model\Callback\Postback;
5
6
class PostbackEvent extends AbstractCallbackEvent
7
{
8
9
    /**
10
     * @var \Kerox\Messenger\Model\Callback\Postback
11
     */
12
    protected $postback;
13
14
    /**
15
     * PostbackEvent constructor.
16
     *
17
     * @param string $senderId
18
     * @param string $recipientId
19
     * @param int $timestamp
20
     * @param \Kerox\Messenger\Model\Callback\Postback $postback
21
     */
22
    public function __construct(string $senderId, string $recipientId, int $timestamp, Postback $postback)
23
    {
24
        parent::__construct($senderId, $recipientId, $timestamp);
25
26
        $this->postback = $postback;
27
    }
28
29
    /**
30
     * @return \Kerox\Messenger\Model\Callback\Postback
31
     */
32
    public function getPostback(): Postback
33
    {
34
        return $this->postback;
35
    }
36
}