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 ( c99574...e190cf )
by Cas
04:59
created

SimpleMessage   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 92
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 83.33%

Importance

Changes 5
Bugs 0 Features 1
Metric Value
wmc 6
c 5
b 0
f 1
lcom 0
cbo 1
dl 0
loc 92
ccs 10
cts 12
cp 0.8333
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A getChannel() 0 4 1
A getUserId() 0 4 1
A getUsername() 0 4 1
A getText() 0 4 1
A getSlackTimestamp() 0 4 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 SimpleChannel
79
     */
80
    public function getChannel()
81
    {
82
        return $this->channel;
83
    }
84
85
    /**
86
     * @return string|null The ID of the user that posted the message,
87
     *                     can be null if the message was made by Slack itself.
88
     */
89 24
    public function getUserId()
90
    {
91 24
        return $this->user;
92
    }
93
94
    /**
95
     * @return string|null The username belonging to the user that posted the message,
96
     *                     can be null if the message was made by Slack itself.
97
     */
98 24
    public function getUsername()
99
    {
100 24
        return $this->username;
101
    }
102
103
    /**
104
     * @return string The actual text of the message.
105
     */
106 24
    public function getText()
107
    {
108 24
        return $this->text;
109
    }
110
}
111