Completed
Push — master ( 44c8cf...8136fc )
by WEBEWEB
01:28
created

DeliveryReportEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 57
c 0
b 0
f 0
wmc 5
lcom 0
cbo 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDeliveryReport() 0 3 1
A getRequest() 0 3 1
A getResponse() 0 3 1
A setDeliveryReport() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the smsmode-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\SMSModeBundle\Event;
13
14
use WBW\Bundle\SMSModeBundle\Entity\DeliveryReportInterface;
15
use WBW\Library\SMSMode\Model\DeliveryReportRequest;
16
use WBW\Library\SMSMode\Model\DeliveryReportResponse;
17
18
/**
19
 * Delivery report event
20
 *
21
 * @author webeweb <https://github.com/webeweb/>
22
 * @package WBW\Bundle\SMSModeBundle\Event
23
 */
24
class DeliveryReportEvent extends AbstractResponseEvent {
25
26
    /**
27
     * Delivery report.
28
     *
29
     * @var DeliveryReportInterface
30
     */
31
    private $deliveryReport;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param DeliveryReportInterface $deliveryReport The delivery report.
37
     */
38
    public function __construct(DeliveryReportInterface $deliveryReport) {
39
        parent::__construct(SMSModeEvents::DELIVERY_REPORT);
40
        $this->setDeliveryReport($deliveryReport);
41
    }
42
43
    /**
44
     * Get the delivery report.
45
     *
46
     * @return DeliveryReportInterface Returns the delivery report.
47
     */
48
    public function getDeliveryReport() {
49
        return $this->deliveryReport;
50
    }
51
52
    /**
53
     * Get the delivery report request.
54
     *
55
     * @return DeliveryReportRequest Returns the delivery report request.
56
     */
57
    public function getRequest() {
58
        return parent::getRequest();
59
    }
60
61
    /**
62
     * Get the delivery report response.
63
     *
64
     * @return DeliveryReportResponse Returns the delivery report response.
65
     */
66
    public function getResponse() {
67
        return parent::getResponse();
68
    }
69
70
    /**
71
     * Set the delivery report.
72
     *
73
     * @param DeliveryReportInterface $deliveryReport The delivery report.
74
     * @return DeliveryReportEvent Returns this delivery report event.
75
     */
76
    protected function setDeliveryReport(DeliveryReportInterface $deliveryReport) {
77
        $this->deliveryReport = $deliveryReport;
78
        return $this;
79
    }
80
}
81