Completed
Pull Request — master (#3)
by Romain
01:47
created

DeliveryEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

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