Total Complexity | 4 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | abstract class AbstractExtension implements ExtensionInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | private $identifier; |
||
13 | |||
14 | /** |
||
15 | * @var string[] |
||
16 | */ |
||
17 | private $supportedOperations; |
||
18 | |||
19 | public function __construct(string $identifier, array $supportedOperations) |
||
20 | { |
||
21 | $this->identifier = $identifier; |
||
22 | |||
23 | if (!ExtensionHelper::validExtensionIdentifier($identifier)) { |
||
24 | throw new WebAuthnException(sprintf("Invalid extension identifier '%s'.", $identifier)); |
||
25 | } |
||
26 | $this->supportedOperations = $supportedOperations; |
||
27 | } |
||
28 | |||
29 | public function getIdentifier(): string |
||
30 | { |
||
31 | return $this->identifier; |
||
32 | } |
||
33 | |||
34 | public function getSupportedOperations(): array |
||
37 | } |
||
38 | } |
||
39 |