SmsEvent::setFrom()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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 Symfony\Component\EventDispatcher\Event;
16
17
/**
18
 * SmsEvent.
19
 *
20
 * @author Artem Henvald <[email protected]>
21
 */
22
class SmsEvent 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...
23
{
24
    /** @var string */
25
    private $number;
26
27
    /** @var string */
28
    private $message;
29
30
    /** @var string|null */
31
    private $from;
32
33
    /**
34
     * @param string      $number
35
     * @param string      $message
36
     * @param string|null $from
37
     */
38
    public function __construct(string $number, string $message, ?string $from = null)
39
    {
40
        $this->number = $number;
41
        $this->message = $message;
42
        $this->from = $from;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getNumber(): string
49
    {
50
        return $this->number;
51
    }
52
53
    /**
54
     * @param string $number
55
     *
56
     * @return $this
57
     */
58
    public function setNumber(string $number): self
59
    {
60
        $this->number = $number;
61
62
        return $this;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getMessage(): string
69
    {
70
        return $this->message;
71
    }
72
73
    /**
74
     * @param string $message
75
     *
76
     * @return $this
77
     */
78
    public function setMessage(string $message): self
79
    {
80
        $this->message = $message;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @return null|string
87
     */
88
    public function getFrom(): ?string
89
    {
90
        return $this->from;
91
    }
92
93
    /**
94
     * @param null|string $from
95
     *
96
     * @return $this
97
     */
98
    public function setFrom(?string $from): self
99
    {
100
        $this->from = $from;
101
102
        return $this;
103
    }
104
}
105