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
Push — master ( 513b86...a0fe62 )
by Peter
04:01
created

MessagebirdMessage::setBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace NotificationChannels\Messagebird;
4
5
use MessageBird\Objects\Message;
6
7
class MessagebirdMessage extends Message
8
{
9
    public static function create($body = '')
10
    {
11
        return new static($body);
12
    }
13
14
    public function __construct($body = '')
15
    {
16
        if (! empty($body)) {
17
            $this->body = trim($body);
18
        }
19
    }
20
21
    public function setBody($body)
22
    {
23
        $this->body = trim($body);
24
25
        return $this;
26
    }
27
28
    public function setOriginator($originator)
29
    {
30
        $this->originator = $originator;
31
32
        return $this;
33
    }
34
35
    public function setRecipients($recipients)
36
    {
37
        if (is_string($recipients)) {
38
            $recipients = [$recipients];
39
        }
40
41
        $this->recipients = $recipients;
42
43
        return $this;
44
    }
45
}
46