Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
5 | class AfricasTalkingMessage |
||
6 | { |
||
7 | /** @var string */ |
||
8 | protected $content; |
||
9 | |||
10 | /** @var string|null */ |
||
11 | protected $from; |
||
12 | |||
13 | /** |
||
14 | * Set content for this message. |
||
15 | * |
||
16 | * @param string $content |
||
17 | * @return this |
||
18 | */ |
||
19 | public function content(string $content): self |
||
20 | { |
||
21 | $this->content = trim($content); |
||
22 | |||
23 | return $this; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Set sender for this message. |
||
28 | * |
||
29 | * @param string $from |
||
30 | * @return self |
||
31 | */ |
||
32 | public function from(string $from): self |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * Get message content. |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getContent() |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Get sender info. |
||
51 | * |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getSender() |
||
59 |