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.

ChatUpdatePayloadResponse::getPossibleErrors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 7
cts 7
cp 1
rs 9.9666
c 0
b 0
f 0
cc 1
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\Payload;
13
14
/**
15
 * @author Cas Leentfaar <[email protected]>
16
 */
17
class ChatUpdatePayloadResponse extends AbstractPayloadResponse
18
{
19
    /**
20
     * @var string|null
21
     */
22
    private $channel;
23
24
    /**
25
     * @var string
26
     */
27
    private $ts;
28
29
    /**
30
     * @var string|null
31
     */
32
    private $text;
33
34
    /**
35
     * @return string|null
36
     */
37 1
    public function getChannelId()
38
    {
39 1
        return $this->channel;
40
    }
41
42
    /**
43
     * @return string
44
     */
45 1
    public function getSlackTimestamp()
46
    {
47 1
        return $this->ts;
48
    }
49
50
    /**
51
     * @return string|null
52
     */
53 1
    public function getText()
54
    {
55 1
        return $this->text;
56
    }
57
58
    /**
59
     * @inheritdoc
60
     */
61 1
    protected function getPossibleErrors()
62
    {
63 1
        return array_merge(parent::getPossibleErrors(), [
64 1
            'cant_update_message' => 'Authenticated user does not have permission to update this message',
65 1
            'edit_window_closed' => 'The message cannot be edited due to the team message edit settings',
66 1
            'msg_too_long' => 'Message text is too long',
67 1
            'no_text' => 'No message text provided',
68 1
        ]);
69
    }
70
}
71