Passed
Push — master ( 18cedb...696cbf )
by Melech
04:01
created

Message::getTo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Sms\Data;
15
16
use Valkyrja\Sms\Data\Contract\Message as Contract;
17
18
/**
19
 * Class Message.
20
 *
21
 * @author Melech Mizrachi
22
 */
23
class Message implements Contract
24
{
25
    /**
26
     * The message to.
27
     *
28
     * @var string
29
     */
30
    protected string $to;
31
32
    /**
33
     * The message from.
34
     *
35
     * @var string
36
     */
37
    protected string $from;
38
39
    /**
40
     * The message text.
41
     *
42
     * @var string
43
     */
44
    protected string $text;
45
46
    /**
47
     * Whether the text is unicode.
48
     *
49
     * @var bool
50
     */
51
    protected bool $isUnicode = true;
52
53
    /**
54
     * @inheritDoc
55
     */
56
    public function getTo(): string
57
    {
58
        return $this->to;
59
    }
60
61
    /**
62
     * @inheritDoc
63
     */
64
    public function setTo(string $to): static
65
    {
66
        $this->to = $to;
67
68
        return $this;
69
    }
70
71
    /**
72
     * @inheritDoc
73
     */
74
    public function getFrom(): string
75
    {
76
        return $this->from;
77
    }
78
79
    /**
80
     * @inheritDoc
81
     */
82
    public function setFrom(string $from): static
83
    {
84
        $this->from = $from;
85
86
        return $this;
87
    }
88
89
    /**
90
     * @inheritDoc
91
     */
92
    public function getText(): string
93
    {
94
        return $this->text;
95
    }
96
97
    /**
98
     * @inheritDoc
99
     */
100
    public function setText(string $text): static
101
    {
102
        $this->text = $text;
103
104
        return $this;
105
    }
106
107
    /**
108
     * @inheritDoc
109
     */
110
    public function isUnicode(): bool
111
    {
112
        return $this->isUnicode;
113
    }
114
115
    /**
116
     * @inheritDoc
117
     */
118
    public function setIsUnicode(bool $isUnicode = true): static
119
    {
120
        $this->isUnicode = $isUnicode;
121
122
        return $this;
123
    }
124
}
125