AuthenticatorAttestationResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 21
ccs 8
cts 8
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A asAttestationResponse() 0 3 1
A __construct() 0 4 1
A getAttestationObject() 0 3 1
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