Test Failed
Pull Request — master (#1)
by
unknown
05:13
created

AfricasTalkingMessage::getSender()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace NotificationChannels\AfricasTalking;
4
5
class AfricasTalkingMessage
6
{
7
    /** @var string */
8
    protected $content;
9
10
    /** @var string|null */
11
    protected $from;
12
13
    /**
14
     * Set the content for this message
15
     * 
16
     * 
17
     * @param string $content
18
     * @return this
19
     */
20
    public function content(string $content): self
21
    {
22
        $this->content = trim($content);
23
24
        return $this;
25
    }
26
27
    /**
28
     * Set the sender for this message
29
     * 
30
     * @param string $from
31
     * @return this
32
     */
33
    public function from(string $from): self
34
    {
35
        $this->from = trim($from);
36
37
        return $this;
38
    }
39
40
    /**
41
     * Get Message Content
42
     * 
43
     * @return string
44
     */
45
    public function getContent()
46
    {
47
        return $this->content;
48
    }
49
50
    /**
51
     * Get Sender Info
52
     * 
53
     * @return string
54
     */
55
    public function getSender()
56
    {
57
        return $this->from ?? config('services.africastalking.from');
58
    }
59
}
60