JusibeMessage::from()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 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
     * Create a new message instance.
23
     *
24
     * @param  string  $content
25
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
26
     */
27
    public function __construct($content = '')
28
    {
29
        $this->content = $content;
30
    }
31
32
    /**
33
     * Set the message content.
34
     *
35
     * @param  string  $content
36
     * @return $this
37
     */
38
    public function content($content)
39
    {
40
        $this->content = $content;
41
42
        return $this;
43
    }
44
45
    /**
46
     * Set the phone number the message should be sent from.
47
     *
48
     * @param  string  $from
49
     * @return $this
50
     */
51
    public function from($from)
52
    {
53
        $this->from = $from;
54
55
        return $this;
56
    }
57
}
58
59