SmsMessageCallbackEvent   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

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 Henvald <[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
declare(strict_types=1);
12
13
namespace Fresh\SinchBundle\Event;
14
15
use Fresh\SinchBundle\Model\CallbackRequest;
16
use Fresh\SinchBundle\Model\Identity;
17
use Symfony\Component\EventDispatcher\Event;
18
19
/**
20
 * SmsMessageCallbackEvent.
21
 *
22
 * @author Artem Henvald <[email protected]>
23
 */
24
class SmsMessageCallbackEvent extends Event
0 ignored issues
show
Deprecated Code introduced by
The class Symfony\Component\EventDispatcher\Event has been deprecated with message: since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
25
{
26
    /** @var CallbackRequest */
27
    private $callbackRequest;
28
29
    /**
30
     * @param CallbackRequest $callbackRequest
31
     */
32
    public function __construct(CallbackRequest $callbackRequest)
33
    {
34
        $this->callbackRequest = $callbackRequest;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getEvent(): string
41
    {
42
        return $this->callbackRequest->getEvent();
43
    }
44
45
    /**
46
     * @return Identity
47
     */
48
    public function getTo(): Identity
49
    {
50
        return $this->callbackRequest->getTo();
51
    }
52
53
    /**
54
     * @return Identity
55
     */
56
    public function getFrom(): Identity
57
    {
58
        return $this->callbackRequest->getFrom();
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getMessage(): string
65
    {
66
        return $this->callbackRequest->getMessage();
67
    }
68
69
    /**
70
     * @return \DateTime
71
     */
72
    public function getTimestamp(): \DateTime
73
    {
74
        return $this->callbackRequest->getTimestamp();
75
    }
76
77
    /**
78
     * @return int
79
     */
80
    public function getVersion(): int
81
    {
82
        return $this->callbackRequest->getVersion();
83
    }
84
}
85