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.

Post::getFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 18
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 20
ccs 2
cts 2
cp 1
crap 1
rs 9.6666
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Pnz\MattermostClient\Model\Post;
6
7
use Pnz\MattermostClient\Model\Model;
8
9
final class Post extends Model
10
{
11 4
    public function getId(): string
12
    {
13 4
        return $this->data['id'] ?? '';
14
    }
15
16 4
    public function getCreateAt(): int
17
    {
18 4
        return $this->data['create_at'] ?? 0;
19
    }
20
21 4
    public function getUpdateAt(): int
22
    {
23 4
        return $this->data['update_at'] ?? 0;
24
    }
25
26 4
    public function getDeleteAt(): int
27
    {
28 4
        return $this->data['delete_at'] ?? 0;
29
    }
30
31 4
    public function getMessage(): string
32
    {
33 4
        return $this->data['message'] ?? '';
34
    }
35
36 4
    public function getIsPinned(): bool
37
    {
38 4
        return $this->data['is_pinned'] ?? false;
39
    }
40
41 4
    public function getChannelId(): string
42
    {
43 4
        return $this->data['channel_id'] ?? '';
44
    }
45
46 4
    public function getUserId(): string
47
    {
48 4
        return $this->data['user_id'] ?? '';
49
    }
50
51 4
    public function getRootId(): string
52
    {
53 4
        return $this->data['root_id'] ?? '';
54
    }
55
56 4
    public function getParentId(): string
57
    {
58 4
        return $this->data['parent_id'] ?? '';
59
    }
60
61 4
    public function getOriginalId(): string
62
    {
63 4
        return $this->data['original_id'] ?? '';
64
    }
65
66 4
    public function getType(): string
67
    {
68 4
        return $this->data['type'] ?? '';
69
    }
70
71 4
    public function getProps(): array
72
    {
73 4
        return $this->data['props'] ?? [];
74
    }
75
76 4
    public function getHashtag(): string
77
    {
78 4
        return $this->data['hashtag'] ?? '';
79
    }
80
81 4
    public function getFilenames(): array
82
    {
83 4
        return $this->data['filenames'] ?? [];
84
    }
85
86 4
    public function getFileIds(): array
87
    {
88 4
        return $this->data['file_ids'] ?? [];
89
    }
90
91 4
    public function getPendingPostId(): string
92
    {
93 4
        return $this->data['pending_post_id'] ?? '';
94
    }
95
96 4
    protected static function getFields(): array
97
    {
98
        return [
99 4
            'id',
100
            'create_at',
101
            'update_at',
102
            'delete_at',
103
            'user_id',
104
            'channel_id',
105
            'is_pinned',
106
            'root_id',
107
            'parent_id',
108
            'original_id',
109
            'message',
110
            'type',
111
            'props',
112
            'hashtag',
113
            'filenames',
114
            'file_ids',
115
            'pending_post_id',
116
        ];
117
    }
118
}
119