UserCredential::getPublicKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

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
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace MadWizard\WebAuthn\Credential;
4
5
use MadWizard\WebAuthn\Crypto\CoseKeyInterface;
6
7
class UserCredential implements UserCredentialInterface
8
{
9
    /**
10
     * @var CredentialId
11
     */
12
    private $credentialId;
13
14
    /**
15
     * @var CoseKeyInterface
16
     */
17
    private $publicKey;
18
19
    /**
20
     * @var UserHandle
21
     */
22
    private $userHandle;
23
24 1
    public function __construct(CredentialId $credentialId, CoseKeyInterface $publicKey, UserHandle $userHandle)
25
    {
26 1
        $this->credentialId = $credentialId;
27 1
        $this->publicKey = $publicKey;
28 1
        $this->userHandle = $userHandle;
29 1
    }
30
31 1
    public function getCredentialId(): CredentialId
32
    {
33 1
        return $this->credentialId;
34
    }
35
36 1
    public function getPublicKey(): CoseKeyInterface
37
    {
38 1
        return $this->publicKey;
39
    }
40
41 1
    public function getUserHandle(): UserHandle
42
    {
43 1
        return $this->userHandle;
44
    }
45
}
46