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.

User::getUrl()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\SetlistFm\Model;
13
14
final class User
15
{
16
    /**
17
     * @var string
18
     */
19
    private $id;
20
21
    /**
22
     * @var string|null
23
     */
24
    private $fullname;
25
26
    /**
27
     * @var string|null
28
     */
29
    private $about;
30
31
    /**
32
     * @var string|null
33
     */
34
    private $website;
35
36
    /**
37
     * @var string|null
38
     */
39
    private $url;
40
41
    public function __construct(string $id, ?string $fullname, ?string $about, ?string $website, ?string $url)
42
    {
43
        $this->id       = $id;
44
        $this->fullname = $fullname;
45
        $this->about    = $about;
46
        $this->website  = $website;
47
        $this->url      = $url;
48
    }
49
50
    public function getId(): string
51
    {
52
        return $this->id;
53
    }
54
55
    public function getFullname(): ?string
56
    {
57
        return $this->fullname;
58
    }
59
60
    public function getAbout(): ?string
61
    {
62
        return $this->about;
63
    }
64
65
    public function getWebsite(): ?string
66
    {
67
        return $this->website;
68
    }
69
70
    public function getUrl(): ?string
71
    {
72
        return $this->url;
73
    }
74
75
    /**
76
     * @return User
77
     */
78
    public static function fromApi(array $data): self
79
    {
80
        return new self(
81
            $data['userId'],
82
            $data['fullname'] ?? null,
83
            $data['about'] ?? null,
84
            $data['website'] ?? null,
85
            $data['url'] ?? null
86
        );
87
    }
88
}
89