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

TokenBindingStatus::isValidValue()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

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