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.

Error::getStatusCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Pnz\MattermostClient\Model;
6
7
final class Error extends Model
8
{
9 2
    public function getId(): string
10
    {
11 2
        return $this->data['id'] ?? '';
12
    }
13
14 9
    public function getMessage(): string
15
    {
16 9
        return $this->data['message'] ?? '';
17
    }
18
19 2
    public function getDetailedError(): string
20
    {
21 2
        return $this->data['detailed_error'] ?? '';
22
    }
23
24 2
    public function getStatusCode(): int
25
    {
26 2
        return $this->data['status_code'] ?? 0;
27
    }
28
29 2
    public function getRequestId(): string
30
    {
31 2
        return $this->data['request_id'] ?? '';
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 9
    protected static function getFields(): array
38
    {
39 9
        return ['id', 'message', 'status_code', 'request_id', 'detailed_error'];
40
    }
41
}
42