Completed
Pull Request — master (#4)
by Artem
07:26
created

AbstractBaseSmsEvent::setFrom()   A

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