GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#43)
by
unknown
05:33 queued 04:30
created

SmscRuMessage::to()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 5
cts 5
cp 1
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
namespace NotificationChannels\SmscRu;
4
5
class SmscRuMessage
6
{
7
    /**
8
     * The phone number the message should be sent from.
9
     *
10
     * @var string
11
     */
12
    public $from = '';
13
14
    /**
15
     * The message content.
16
     *
17
     * @var string
18
     */
19
    public $content = '';
20
21
    /**
22
     * The receiver's phone number.
23
     *
24
     * @var array
25
     */
26
    public $to = [];
27
28
    /**
29
     * Time of sending a message.
30
     *
31
     * @var \DateTimeInterface
32
     */
33
    public $sendAt;
34
35
    /**
36
     * Create a new message instance.
37
     *
38
     * @param  string $content
39
     *
40
     * @return static
41
     */
42 6
    public static function create($content = '')
43
    {
44 6
        return new static($content);
45
    }
46
47
    /**
48
     * @param  string  $content
49
     */
50 12
    public function __construct($content = '')
51
    {
52 12
        $this->content = $content;
53 12
    }
54
55
    /**
56
     * Set the message content.
57
     *
58
     * @param  string  $content
59
     *
60
     * @return $this
61
     */
62 1
    public function content($content)
63
    {
64 1
        $this->content = $content;
65
66 1
        return $this;
67
    }
68
69
    /**
70
     * Set the phone number or sender name the message should be sent from.
71
     *
72
     * @param  string  $from
73
     *
74
     * @return $this
75
     */
76 6
    public function from($from)
77
    {
78 6
        $this->from = $from;
79
80 6
        return $this;
81
    }
82
83
    /**
84
     * Set the receiver's phone number.
85
     *
86
     * @param string|array $to
87
     *
88
     * @return $this
89
     */
90 3
    public function to($to)
91
    {
92 3
        if (! is_array($to)) {
93 2
            $to = [$to];
94
        }
95
96 3
        $this->to = $to;
97
98 3
        return $this;
99
    }
100
101
    /**
102
     * Set the time the message should be sent.
103
     *
104
     * @param  \DateTimeInterface|null  $sendAt
105
     *
106
     * @return $this
107
     */
108 2
    public function sendAt(\DateTimeInterface $sendAt = null)
109
    {
110 2
        $this->sendAt = $sendAt;
111
112 2
        return $this;
113
    }
114
}
115