ZonerSmsGatewayMessage   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 3
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 4
c 3
b 0
f 0
lcom 3
cbo 0
dl 0
loc 74
ccs 12
cts 12
cp 1
rs 10

4 Methods

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