Total Complexity | 7 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | final class AttestationKeyIdentifier implements IdentifierInterface |
||
8 | { |
||
9 | public const TYPE = 'publickeyid'; |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | private $id; |
||
15 | |||
16 | public function __construct(string $identifier) |
||
17 | { |
||
18 | if (!(strlen($identifier) === 40 && ctype_xdigit($identifier))) { |
||
19 | throw new ParseException('Invalid key identifier.'); |
||
20 | } |
||
21 | $this->id = strtolower($identifier); |
||
22 | } |
||
23 | |||
24 | public function getType(): string |
||
27 | } |
||
28 | |||
29 | public function toString(): string |
||
32 | } |
||
33 | |||
34 | public function equals(IdentifierInterface $identifier): bool |
||
37 | } |
||
38 | } |
||
39 |