Message::getFrom()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

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