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

TokenBindingStatus   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 22
ccs 2
cts 2
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isValidValue() 0 3 2
A __construct() 0 2 1
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