asAttestationResponse()   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 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace MadWizard\WebAuthn\Dom;
4
5
use MadWizard\WebAuthn\Format\ByteBuffer;
6
7
final class AuthenticatorAttestationResponse extends AbstractAuthenticatorResponse implements AuthenticatorAttestationResponseInterface
8
{
9
    /**
10
     * @var ByteBuffer
11
     */
12
    private $attestationObject;
13
14 7
    public function __construct(string $clientDataJson, ByteBuffer $attestationObject)
15
    {
16 7
        parent::__construct($clientDataJson);
17 6
        $this->attestationObject = $attestationObject;
18 6
    }
19
20 6
    public function getAttestationObject(): ByteBuffer
21
    {
22 6
        return $this->attestationObject;
23
    }
24
25 5
    public function asAttestationResponse(): AuthenticatorAttestationResponseInterface
26
    {
27 5
        return $this;
28
    }
29
}
30