SmsMessage   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 3
cbo 0
dl 0
loc 47
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A from() 0 6 1
A getFrom() 0 4 1
A to() 0 6 1
A getTo() 0 4 1
A text() 0 6 1
A getText() 0 4 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