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::name()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

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
rs 10
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