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 ( 9be716...8dfb79 )
by Cas
10:46 queued 07:19
created

GroupsClosePayloadResponse   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 33.33%

Importance

Changes 4
Bugs 1 Features 0
Metric Value
wmc 3
c 4
b 1
f 0
lcom 0
cbo 1
dl 0
loc 42
ccs 4
cts 12
cp 0.3333
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A isAlreadyClosed() 0 4 1
A isNoOp() 0 4 1
A getPossibleErrors() 0 10 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 GroupsClosePayloadResponse extends AbstractPayloadResponse
18
{
19
    /**
20
     * @var bool
21
     */
22
    private $noOp;
23
24
    /**
25
     * @var bool
26
     */
27
    private $alreadyClosed;
28
29
    /**
30
     * @return bool
31
     */
32 1
    public function isAlreadyClosed()
33
    {
34 1
        return $this->alreadyClosed;
35
    }
36
37
    /**
38
     * @return bool
39
     */
40 1
    public function isNoOp()
41
    {
42 1
        return $this->noOp;
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    protected function getPossibleErrors()
49
    {
50
        return array_merge(parent::getPossibleErrors(), [
51
            'channel_not_found' => 'Value passed for group was invalid',
52
            'already_archived' => 'Group has already been archived',
53
            'group_contains_others' => 'Restricted accounts cannot archive groups containing others',
54
            'last_ra_channel' => 'You cannot archive the last channel for a restricted account',
55
            'restricted_action' => 'A team preference prevents authenticated user from archiving',
56
        ]);
57
    }
58
}
59