CredentialCreationOptions::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 0
c 1
b 1
f 0
nc 1
nop 0
dl 0
loc 2
ccs 1
cts 1
cp 1
crap 1
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