Completed
Push — master ( d7d555...8d86ce )
by Thomas
06:51 queued 03:43
created

CertificateExtension   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 81.82%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 10
c 1
b 1
f 0
dl 0
loc 37
ccs 9
cts 11
cp 0.8182
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isCritical() 0 3 1
A getOid() 0 3 1
A getValue() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace MadWizard\WebAuthn\Pki;
4
5
use MadWizard\WebAuthn\Format\ByteBuffer;
6
7
final class CertificateExtension
8
{
9
    /**
10
     * @var string
11
     */
12
    private $oid;
13
14
    /**
15
     * @var bool
16
     */
17
    private $critical;
18
19
    /**
20
     * @var ByteBuffer
21
     */
22
    private $value;
23
24 6
    public function __construct(string $oid, bool $critical, ByteBuffer $value)
25
    {
26 6
        $this->oid = $oid;
27 6
        $this->critical = $critical;
28 6
        $this->value = $value;
29 6
    }
30
31
    public function getOid(): string
32
    {
33
        return $this->oid;
34
    }
35
36 5
    public function isCritical(): bool
37
    {
38 5
        return $this->critical;
39
    }
40
41 5
    public function getValue(): ByteBuffer
42
    {
43 5
        return $this->value;
44
    }
45
}
46