CredentialCreationOptions::getPublicKeyOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace MadWizard\WebAuthn\Dom;
4
5
final class CredentialCreationOptions extends AbstractDictionary
6
{
7
    /**
8
     * @var PublicKeyCredentialCreationOptions|null
9
     */
10
    private $publicKey;
11
12 1
    public function __construct()
13
    {
14 1
    }
15
16 1
    public function setPublicKeyOptions(PublicKeyCredentialCreationOptions $options): void
17
    {
18 1
        $this->publicKey = $options;
19 1
    }
20
21
    public function getPublicKeyOptions(): ?PublicKeyCredentialCreationOptions
22
    {
23
        return $this->publicKey;
24
    }
25
26 1
    public function getAsArray(): array
27
    {
28 1
        $map = [];
29 1
        if ($this->publicKey !== null) {
30 1
            $map['publicKey'] = $this->publicKey;
31
        }
32 1
        return $map;
33
    }
34
}
35