Completed
Push — master ( af97d0...c93ab2 )
by Nikola
03:56
created

SmsMessage::text()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Notifier\Channel\Sms;
6
7
class SmsMessage
8
{
9
    /** @var string */
10
    protected $from;
11
12
    /** @var string */
13
    protected $to = '';
14
15
    /** @var string */
16
    protected $text = '';
17
18 6
    public function from(string $phoneNumber)
19
    {
20 6
        $this->from = $phoneNumber;
21
22 6
        return $this;
23
    }
24
25 6
    public function getFrom(): ?string
26
    {
27 6
        return $this->from;
28
    }
29
30 6
    public function to(string $phoneNumber)
31
    {
32 6
        $this->to = $phoneNumber;
33
34 6
        return $this;
35
    }
36
37 6
    public function getTo(): string
38
    {
39 6
        return $this->to;
40
    }
41
42 6
    public function text(string $text)
43
    {
44 6
        $this->text = $text;
45
46 6
        return $this;
47
    }
48
49 2
    public function getText(): string
50
    {
51 2
        return $this->text;
52
    }
53
}
54