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.

Token::get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Bundle\ApiAuthBundle\Jwt;
6
7
final class Token
8
{
9
    private $data;
10
11
    public static function fromClaims(array $claims): self
12
    {
13
        return new self($claims);
14
    }
15
16
    private function __construct(array $data)
17
    {
18
        $this->data = $data;
19
    }
20
21
    public function has(string $name): bool
22
    {
23
        return array_key_exists($name, $this->data);
24
    }
25
26
    public function get(string $name, $default = null)
27
    {
28
        return $this->data[$name] ?? $default;
29
    }
30
31
    public function all(): array
32
    {
33
        return $this->data;
34
    }
35
}
36