TocItem   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 54
ccs 0
cts 14
cp 0
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 3 1
A getHash() 0 3 1
A __construct() 0 6 1
A getStatusReports() 0 3 1
A getIdentifier() 0 3 1
1
<?php
2
3
namespace MadWizard\WebAuthn\Metadata\Statement;
4
5
use MadWizard\WebAuthn\Attestation\Identifier\IdentifierInterface;
6
use MadWizard\WebAuthn\Format\ByteBuffer;
7
8
class TocItem
9
{
10
    /**
11
     * @var IdentifierInterface
12
     */
13
    private $identifier;
14
15
    /**
16
     * @var ByteBuffer|null
17
     */
18
    private $hash;
19
20
    /**
21
     * @var string|null
22
     */
23
    private $url;
24
25
    /**
26
     * @var StatusReport[]
27
     */
28
    private $statusReports;
29
30
    /**
31
     * @param StatusReport[] $statusReports
32
     */
33
    public function __construct(IdentifierInterface $identifier, ?ByteBuffer $hash, ?string $url, array $statusReports)
34
    {
35
        $this->identifier = $identifier;
36
        $this->hash = $hash;
37
        $this->url = $url;
38
        $this->statusReports = $statusReports;
39
    }
40
41
    public function getIdentifier(): IdentifierInterface
42
    {
43
        return $this->identifier;
44
    }
45
46
    public function getHash(): ?ByteBuffer
47
    {
48
        return $this->hash;
49
    }
50
51
    public function getUrl(): ?string
52
    {
53
        return $this->url;
54
    }
55
56
    /**
57
     * @return StatusReport[]
58
     */
59
    public function getStatusReports(): array
60
    {
61
        return $this->statusReports;
62
    }
63
}
64