SmsMessage::from()   A
last analyzed

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 7
    public function from(string $phoneNumber)
19
    {
20 7
        $this->from = $phoneNumber;
21
22 7
        return $this;
23
    }
24
25 9
    public function getFrom(): ?string
26
    {
27 9
        return $this->from;
28
    }
29
30 9
    public function to(string $phoneNumber)
31
    {
32 9
        $this->to = $phoneNumber;
33
34 9
        return $this;
35
    }
36
37 9
    public function getTo(): string
38
    {
39 9
        return $this->to;
40
    }
41
42 9
    public function text(string $text)
43
    {
44 9
        $this->text = $text;
45
46 9
        return $this;
47
    }
48
49 4
    public function getText(): string
50
    {
51 4
        return $this->text;
52
    }
53
}
54