SmspohMessage   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 11
c 1
b 0
f 0
dl 0
loc 71
ccs 12
cts 12
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A content() 0 5 1
A test() 0 5 1
A __construct() 0 3 1
A sender() 0 5 1
1
<?php
2
3
namespace NotificationChannels\Smspoh;
4
5
class SmspohMessage
6
{
7
    /**
8
     * The message content.
9
     *
10
     * @var string
11
     */
12
    public $content;
13
14
    /**
15
     * The sander name the message should be sent from.
16
     *
17
     * @var string
18
     */
19
    public $sender;
20
21
    /**
22
     * Set the test message Send a test message to specific mobile number.
23
     *
24
     * @var bool
25
     */
26
    public $test = false;
27
28
    /**
29
     * Create a new message instance.
30
     *
31
     * @param string $content
32
     * @return void
33
     */
34 8
    public function __construct($content = '')
35
    {
36 8
        $this->content = $content;
37 8
    }
38
39
    /**
40
     * Set the message content.
41
     *
42
     * @param string $content
43
     * @return $this
44
     */
45 1
    public function content($content)
46
    {
47 1
        $this->content = $content;
48
49 1
        return $this;
50
    }
51
52
    /**
53
     * Set the sender name the message should be sent from.
54
     *
55
     * @param string $sender
56
     * @return $this
57
     */
58 4
    public function sender($sender)
59
    {
60 4
        $this->sender = $sender;
61
62 4
        return $this;
63
    }
64
65
    /**
66
     * Set the test message Send a test message to specific mobile number.
67
     *
68
     * @param bool $test
69
     * @return $this
70
     */
71 1
    public function test($test = true)
72
    {
73 1
        $this->test = $test;
74
75 1
        return $this;
76
    }
77
}
78