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

CertificateExtension::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

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