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 (#70)
by
unknown
04:13
created

SimpleMessage::getUsername()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Slack API library.
5
 *
6
 * (c) Cas Leentfaar <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace CL\Slack\Model;
13
14
/**
15
 * @author Cas Leentfaar <[email protected]>
16
 *
17
 * @link Official documentation at https://api.slack.com/types/channel
18
 */
19
class SimpleMessage extends AbstractModel
20
{
21
    /**
22
     * @var string
23
     */
24
    protected $ts;
25
26
    /**
27
     * @var string
28
     */
29
    protected $type;
30
31
    /**
32
     * @var string
33
     */
34
    protected $subtype;
35
36
    /**
37
     * @var SimpleChannel
38
     */
39
    private $channel;
40
41
    /**
42
     * @var string
43
     */
44
    protected $user;
45
46
    /**
47
     * @var string
48
     */
49
    protected $username;
50
51
    /**
52
     * @var string
53
     */
54
    protected $text;
55
56
    /**
57
     * @var array
58
     */
59
    protected $attachments = [];
60
61
    /**
62
     * @return string|null The Slack timestamp on which the message was posted
63
     */
64 24
    public function getSlackTimestamp()
65
    {
66 24
        return $this->ts;
67
    }
68
69
    /**
70
     * @return string The type of message
71
     */
72 24
    public function getType()
73
    {
74 24
        return $this->type;
75
    }
76
    
77
    /**
78
     * @return null|string The subtype of message
79
     */
80
    public function getSubtype()
81
    {
82
        return $this->subtype;
83
    }
84
85
    /**
86
     * @return SimpleChannel
87
     */
88
    public function getChannel()
89
    {
90
        return $this->channel;
91
    }
92
93
    /**
94
     * @return string|null The ID of the user that posted the message,
95
     *                     can be null if the message was made by Slack itself.
96
     */
97 24
    public function getUserId()
98
    {
99 24
        return $this->user;
100
    }
101
102
    /**
103
     * @return string|null The username belonging to the user that posted the message,
104
     *                     can be null if the message was made by Slack itself.
105
     */
106 24
    public function getUsername()
107
    {
108 24
        return $this->username;
109
    }
110
111
    /**
112
     * @return string The actual text of the message.
113
     */
114 24
    public function getText()
115
    {
116 24
        return $this->text;
117
    }
118
}
119