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.

Config   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 40
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A fromString() 0 5 1
A type() 0 3 1
A __construct() 0 5 1
A __toString() 0 3 1
A description() 0 3 1
A name() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace ReactInspector;
4
5
use function explode;
6
7
final class Config
8
{
9
    private string $name;
10
11
    private string $type;
12
13
    private string $description;
14
15
    public function __construct(string $name, string $type, string $description)
16
    {
17
        $this->name        = $name;
18
        $this->type        = $type;
19
        $this->description = $description;
20
    }
21
22
    public function __toString(): string
23
    {
24
        return $this->name . '*' . $this->type . '*' . $this->description;
25
    }
26
27
    public static function fromString(string $string): Config
28
    {
29
        [$name, $type, $description] = explode('*', $string, 3);
30
31
        return new Config($name, $type, $description);
32
    }
33
34
    public function name(): string
35
    {
36
        return $this->name;
37
    }
38
39
    public function type(): string
40
    {
41
        return $this->type;
42
    }
43
44
    public function description(): string
45
    {
46
        return $this->description;
47
    }
48
}
49