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

Channel::isMember()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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 Channel extends SimpleChannel
20
{
21
    /**
22
     * @var SimpleMessage
23
     */
24
    private $latest;
25
26
    /**
27
     * @var string
28
     */
29
    private $lastRead;
30
31
    /**
32
     * @var bool
33
     */
34
    private $isMember;
35
36
    /**
37
     * @var array<string>
38
     */
39
    private $members = [];
40
41
    /**
42
     * @var Customizable
43
     */
44
    private $topic;
45
46
    /**
47
     * @var Customizable
48
     */
49
    private $purpose;
50
51
    /**
52
     * @return string The ID of this channel.
53
     */
54 7
    public function getId()
55
    {
56 7
        return $this->id;
57
    }
58
59
    /**
60
     * @return string The name of the channel, without a leading hash sign.
61
     */
62 7
    public function getName()
63
    {
64 7
        return $this->name;
65
    }
66
67
    /**
68
     * @return SimpleMessage The latest message in the channel.
69
     */
70 7
    public function getLatest()
71
    {
72 7
        return $this->latest;
73
    }
74
75
    /**
76
     * @return string The Slack timestamp for the last message the calling user has read in this channel.
77
     */
78 7
    public function getLastRead()
79
    {
80 7
        return $this->lastRead;
81
    }
82
83
    /**
84
     * @return \DateTime The date/time on which this channel was created.
85
     */
86 7
    public function getCreated()
87
    {
88 7
        return $this->created;
89
    }
90
91
    /**
92
     * @return string The user ID of the member that created this channel.
93
     */
94 7
    public function getCreator()
95
    {
96 7
        return $this->creator;
97
    }
98
99
    /**
100
     * @return bool True if this channel has been archived, false otherwise.
101
     */
102
    public function isArchived()
103
    {
104
        return $this->isArchived;
105
    }
106
107
    /**
108
     * @return bool Returns true if this channel is the "general" channel that includes all regular team members,
109
     *              false otherwise. In most teams this is called #general but some teams have renamed it.
110
     */
111
    public function isGeneral()
112
    {
113
        return $this->isGeneral;
114
    }
115
116
    /**
117
     * @return bool Will be true if the calling member is part of the channel.
118
     */
119
    public function isMember()
120
    {
121
        return $this->isMember;
122
    }
123
124
    /**
125
     * @return array A list of user ids for all users in this channel.
126
     *               This includes any disabled accounts that were in this channel when they were disabled.
127
     */
128 7
    public function getMembers()
129
    {
130 7
        return $this->members;
131
    }
132
133
    /**
134
     * @return Customizable Information about the channel's topic.
135
     */
136 7
    public function getTopic()
137
    {
138 7
        return $this->topic;
139
    }
140
141
    /**
142
     * @return Customizable Information about the channel's purpose.
143
     */
144 7
    public function getPurpose()
145
    {
146 7
        return $this->purpose;
147
    }
148
}
149