Passed
Push — master ( 3a2451...e6e9f9 )
by Thomas
08:19 queued 05:35
created

TokenBindingStatus::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
namespace MadWizard\WebAuthn\Dom;
4
5
final class TokenBindingStatus
6
{
7
    /**
8
     * Token binding was used when communicating with the Relying Party.
9
     */
10
    public const PRESENT = 'present';
11
12
    /**
13
     * The client supports token binding, but it was not negotiated when communicating with the Relying Party.
14
     */
15
    public const SUPPORTED = 'supported';
16
17
    /**
18
     * @codeCoverageIgnore
19
     */
20
    private function __construct()
21
    {
22
    }
23
24 4
    public static function isValidValue(string $value): bool
25
    {
26 4
        return $value === self::PRESENT || $value === self::SUPPORTED;
27
    }
28
}
29