Completed
Push — master ( b8cd1f...a6e83e )
by Artem
02:11
created

SmsMessageCallbackEvent   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 7
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 77
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEvent() 0 4 1
A getTo() 0 4 1
A getFrom() 0 4 1
A getMessage() 0 4 1
A getTimestamp() 0 4 1
A getVersion() 0 4 1
1
<?php
2
/*
3
 * This file is part of the FreshSinchBundle
4
 *
5
 * (c) Artem Genvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Fresh\SinchBundle\Event;
12
13
use Fresh\SinchBundle\Model\CallbackRequest;
14
use Fresh\SinchBundle\Model\Identity;
15
use Symfony\Component\EventDispatcher\Event;
16
17
/**
18
 * SmsMessageCallbackEvent.
19
 *
20
 * @author Artem Genvald <[email protected]>
21
 */
22
class SmsMessageCallbackEvent extends Event
23
{
24
    /**
25
     * @var CallbackRequest $callbackRequest Callback request
26
     */
27
    private $callbackRequest;
28
29
    /**
30
     * Constructor.
31
     *
32
     * @param CallbackRequest $callbackRequest Callback request
33
     */
34
    public function __construct(CallbackRequest $callbackRequest)
35
    {
36
        $this->callbackRequest = $callbackRequest;
37
    }
38
39
    /**
40
     * Get event.
41
     *
42
     * @return string Event
43
     */
44
    public function getEvent()
45
    {
46
        return $this->callbackRequest->getEvent();
47
    }
48
49
    /**
50
     * Get to.
51
     *
52
     * @return Identity To
53
     */
54
    public function getTo()
55
    {
56
        return $this->callbackRequest->getTo();
57
    }
58
59
    /**
60
     * Get from.
61
     *
62
     * @return Identity From
63
     */
64
    public function getFrom()
65
    {
66
        return $this->callbackRequest->getFrom();
67
    }
68
69
    /**
70
     * Get message.
71
     *
72
     * @return string Message
73
     */
74
    public function getMessage()
75
    {
76
        return $this->callbackRequest->getMessage();
77
    }
78
79
    /**
80
     * Get timestamp.
81
     *
82
     * @return \DateTime Timestamp
83
     */
84
    public function getTimestamp()
85
    {
86
        return $this->callbackRequest->getTimestamp();
87
    }
88
89
    /**
90
     * Get version.
91
     *
92
     * @return int Version
93
     */
94
    public function getVersion()
95
    {
96
        return $this->callbackRequest->getVersion();
97
    }
98
}
99