Completed
Push — master ( bd46f2...d4c7f5 )
by Roman
08:20
created

Message   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 10%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 65
ccs 1
cts 10
cp 0.1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setFrom() 0 5 1
A setTo() 0 5 1
A setText() 0 5 1
A getFrom() 0 4 1
A getTo() 0 4 1
A getText() 0 4 1
1
<?php
2
3
namespace RM\SMSender;
4
5
use Nette\Object;
6
use RM\SMSender\IMessage;
7
8
/**
9
 * Basic implementation of Message.
10
 */
11 1
class Message extends Object implements IMessage
12
{
13
	/** @var string */
14
	protected $from;
15
16
	/** @var string */
17
	protected $to;
18
19
	/** @var string */
20
	protected $text;
21
22
	/**
23
	 * @param  string $from
24
	 * @return self
25
	 */
26
	public function setFrom($from)
27
	{
28
		$this->from = $from;
29
		return $this;
30
	}
31
32
	/**
33
	 * @param  string $number
34
	 * @return self
35
	 */
36
	public function setTo($number)
37
	{
38
		$this->to = $number;
39
		return $this;
40
	}
41
42
	/**
43
	 * @param  string $text
44
	 * @return self
45
	 */
46
	public function setText($text)
47
	{
48
		$this->text = $text;
49
		return $this;
50
	}
51
52
	/**
53
	 * @return string
54
	 */
55
	public function getFrom()
56
	{
57
		return $this->from;
58
	}
59
60
	/**
61
	 * @return string
62
	 */
63
	public function getTo()
64
	{
65
		return $this->to;
66
	}
67
68
	/**
69
	 * @return string
70
	 */
71
	public function getText()
72
	{
73
		return $this->text;
74
	}
75
}
76