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
Branch master (fafdd5)
by Cody
01:21
created

DiscordMessage   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 4
lcom 2
cbo 0
dl 0
loc 65
ccs 0
cts 19
cp 0
rs 10
c 1
b 1
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 4 1
A __construct() 0 5 1
A body() 0 6 1
A embed() 0 6 1
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
     * @param string     $body
23
     * @param array|null $embed
24
     *
25
     * @return static
26
     */
27
    public static function create($body = '', $embed = [])
0 ignored issues
show
Unused Code introduced by
The parameter $embed is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
28
    {
29
        return new static($body);
30
    }
31
32
    /**
33
     * @param string $body
34
     * @param array  $embed
35
     */
36
    public function __construct($body = '', $embed = [])
37
    {
38
        $this->body = $body;
39
        $this->embed = $embed;
40
    }
41
42
    /**
43
     * Set the text content of the message.
44
     *
45
     * @param string $body
46
     *
47
     * @return $this
48
     */
49
    public function body($body)
50
    {
51
        $this->body = $body;
52
53
        return $this;
54
    }
55
56
    /**
57
     * Set the embedded object.
58
     *
59
     * @param $embed
60
     *
61
     * @return $this
62
     */
63
    public function embed($embed)
64
    {
65
        $this->embed = $embed;
66
67
        return $this;
68
    }
69
}
70