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.

Channel::getFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 15
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 17
ccs 2
cts 2
cp 1
crap 1
rs 9.7666
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Pnz\MattermostClient\Model\Channel;
6
7
use Pnz\MattermostClient\Model\Model;
8
9
final class Channel extends Model
10
{
11
    public const CHANNEL_DIRECT = 'D';
12
    public const CHANNEL_OPEN = 'O';
13
    public const CHANNEL_PRIVATE = 'P';
14
15 3
    public function getId(): ?string
16
    {
17 3
        return $this->data['id'];
18
    }
19
20 3
    public function getCreateAt(): ?int
21
    {
22 3
        return $this->data['create_at'];
23
    }
24
25 3
    public function getUpdateAt(): ?int
26
    {
27 3
        return $this->data['update_at'];
28
    }
29
30 3
    public function getDeleteAt(): ?int
31
    {
32 3
        return $this->data['delete_at'];
33
    }
34
35 3
    public function getTeamId(): ?string
36
    {
37 3
        return $this->data['team_id'];
38
    }
39
40 3
    public function getType(): ?string
41
    {
42 3
        return $this->data['type'];
43
    }
44
45 3
    public function getDisplayName(): ?string
46
    {
47 3
        return $this->data['display_name'];
48
    }
49
50 3
    public function getName(): ?string
51
    {
52 3
        return $this->data['name'];
53
    }
54
55 3
    public function getHeader(): ?string
56
    {
57 3
        return $this->data['header'];
58
    }
59
60 3
    public function getPurpose(): ?string
61
    {
62 3
        return $this->data['purpose'];
63
    }
64
65 3
    public function getLastPostAt(): ?int
66
    {
67 3
        return $this->data['last_post_at'];
68
    }
69
70 3
    public function getTotalMsgCount(): ?int
71
    {
72 3
        return $this->data['total_msg_count'];
73
    }
74
75 3
    public function getExtraUpdateAt(): ?int
76
    {
77 3
        return $this->data['extra_update_at'];
78
    }
79
80 3
    public function getCreatorId(): ?string
81
    {
82 3
        return $this->data['creator_id'];
83
    }
84
85 3
    protected static function getFields(): array
86
    {
87
        return [
88 3
            'id',
89
            'create_at',
90
            'update_at',
91
            'delete_at',
92
            'team_id',
93
            'type',
94
            'display_name',
95
            'name',
96
            'header',
97
            'purpose',
98
            'last_post_at',
99
            'total_msg_count',
100
            'extra_update_at',
101
            'creator_id',
102
        ];
103
    }
104
}
105