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.

NamedU2fRegistration::getName()   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
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LM\AuthAbstractor\Implementation;
6
7
use LM\AuthAbstractor\Model\INamedU2fRegistration;
8
9
/**
10
 * Implementation of INamedU2fRegistration. Its strings are all encoded.
11
 */
12
class NamedU2fRegistration implements INamedU2fRegistration
13
{
14
    /** @var string */
15
    private $attestationCertificate;
16
17
    /** @var int */
18
    private $counter;
19
20
    /** @var string */
21
    private $keyHandle;
22
23
    /** @var string */
24
    private $name;
25
26
    /** @var string */
27
    private $publicKey;
28
29
    /**
30
     * @param string $attestationCertificate The websafe-base64 encoding of the
31
     * attestation certificate of the U2F token.
32
     * @param int $counter The counter of the U2F token.
33
     * @param string $keyHandle The websafe-base64 encoding of the U2F
34
     * registration key handle.
35
     * @param string $publicKey The websafe-base64 encoding of the U2F
36
     * registration public key.
37
     */
38
    public function __construct(
39
        string $attestationCertificate,
40
        int $counter,
41
        string $keyHandle,
42
        string $name,
43
        string $publicKey
44
    ) {
45
        $this->attestationCertificate = $attestationCertificate;
46
        $this->counter = $counter;
47
        $this->keyHandle = $keyHandle;
48
        $this->name = $name;
49
        $this->publicKey = $publicKey;
50
    }
51
52
    public function getAttestationCertificate(): string
53
    {
54
        return $this->attestationCertificate;
55
    }
56
57
    public function getCounter(): int
58
    {
59
        return $this->counter;
60
    }
61
62
    public function getKeyHandle(): string
63
    {
64
        return $this->keyHandle;
65
    }
66
67
    public function getName(): string
68
    {
69
        return $this->name;
70
    }
71
72
    public function getPublicKey(): string
73
    {
74
        return $this->publicKey;
75
    }
76
77
    public function serialize()
78
    {
79
        return serialize([
80
            $this->attestationCertificate,
81
            $this->counter,
82
            $this->keyHandle,
83
            $this->name,
84
            $this->publicKey,
85
        ]);
86
    }
87
88
    public function unserialize($serialized)
89
    {
90
        list(
91
            $this->attestationCertificate,
92
            $this->counter,
93
            $this->keyHandle,
94
            $this->name,
95
            $this->publicKey) = unserialize($serialized);
96
    }
97
}
98