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.
Passed
Push — master ( 71cb78...a4ef4f )
by Atymic
10:56
created

DiscordMessage::components()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace NotificationChannels\Discord;
4
5
class DiscordMessage
6
{
7
    /**
8
     * The text content of the message.
9
     *
10
     * @var string
11
     */
12
    public $body;
13
14
    /**
15
     * The embedded object attached to the message.
16
     *
17
     * @var array
18
     */
19
    public $embed;
20
21
    /**
22
     * The component objects attached to the message.
23
     *
24
     * @var array
25
     */
26
    public $components;
27
28
    /**
29
     * @param string     $body
30
     * @param array|null $embed
31
     *
32
     * @return static
33
     */
34 1
    public static function create($body = '', $embed = [], $components = [])
35
    {
36 1
        return new static($body, $embed, $components);
37
    }
38
39
    /**
40
     * @param string $body
41
     * @param array  $embed
42
     */
43 4
    public function __construct($body = '', $embed = [], $components = [])
44
    {
45 4
        $this->body = $body;
46 4
        $this->embed = $embed;
47 4
        $this->components = $components;
48
    }
49
50
    /**
51
     * Set the text content of the message.
52
     *
53
     * @param string $body
54
     *
55
     * @return $this
56
     */
57 2
    public function body($body)
58
    {
59 2
        $this->body = $body;
60
61 2
        return $this;
62
    }
63
64
    /**
65
     * Set the embedded object.
66
     *
67
     * @param $embed
68
     *
69
     * @return $this
70
     */
71 1
    public function embed($embed)
72
    {
73 1
        $this->embed = $embed;
74
75 1
        return $this;
76
    }
77
78
    /**
79
     * Set the components object.
80
     *
81
     * @param $components
82
     *
83
     * @return $this
84
     */
85 1
    public function components($components)
86
    {
87 1
        $this->components = $components;
88
89 1
        return $this;
90
    }
91
}
92