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.

NotAnEncodedThrowableException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 1
b 0
f 0
dl 0
loc 28
ccs 0
cts 4
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A field() 0 3 1
A json() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace WyriHaximus;
6
7
use Exception;
8
9
final class NotAnEncodedThrowableException extends Exception
10
{
11
    /** @var array<string, mixed> */
12
    private array $json;
13
    private string $field;
14
15
    /**
16
     * @param array<string, mixed> $json
17
     */
18
    public function __construct(array $json, string $field)
19
    {
20
        parent::__construct('Given array is not an encoded Throwable, at least one field is missing');
21
22
        $this->json  = $json;
23
        $this->field = $field;
24
    }
25
26
    /**
27
     * @return array<string, mixed>
28
     */
29
    public function json(): array
30
    {
31
        return $this->json;
32
    }
33
34
    public function field(): string
35
    {
36
        return $this->field;
37
    }
38
}
39