SmspohMessage::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 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