JusibeMessage   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 81.82%

Importance

Changes 0
Metric Value
wmc 4
lcom 2
cbo 0
dl 0
loc 62
ccs 9
cts 11
cp 0.8182
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A __construct() 0 4 1
A content() 0 6 1
A from() 0 6 1
1
<?php
2
3
namespace NotificationChannels\Jusibe;
4
5
class JusibeMessage
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 $from;
20
21
    /**
22
     * @param  string $content
23
     *
24
     * @return static
25
     */
26
    public static function create($content = '')
27
    {
28
        return new static($content);
29
    }
30
31
    /**
32
     * @param  string  $content
33
     */
34 3
    public function __construct($content = '')
35
    {
36 3
        $this->content = $content;
37 3
    }
38
39
    /**
40
     * Set the message content.
41
     *
42
     * @param  string  $content
43
     *
44
     * @return $this
45
     */
46 1
    public function content($content)
47
    {
48 1
        $this->content = $content;
49
50 1
        return $this;
51
    }
52
53
    /**
54
     * Set the phone number the message should be sent from.
55
     *
56
     * @param  string  $from
57
     *
58
     * @return $this
59
     */
60 1
    public function from($from)
61
    {
62 1
        $this->from = $from;
63
64 1
        return $this;
65
    }
66
}
67