Total Complexity | 5 |
Total Lines | 70 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
16 | class PublicKeyCredentialDescriptor implements \JsonSerializable |
||
17 | { |
||
18 | public const PUBLIC_KEY_CREDENTIAL_TYPE_PUBLIC_KEY = 'public-key'; |
||
19 | |||
20 | public const AUTHENTICATOR_TRANSPORT_USB = 'usb'; |
||
21 | public const AUTHENTICATOR_TRANSPORT_NFC = 'nfc'; |
||
22 | public const AUTHENTICATOR_TRANSPORT_BLE = 'ble'; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $type; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $id; |
||
33 | |||
34 | /** |
||
35 | * @var string[] |
||
36 | */ |
||
37 | private $transports; |
||
38 | |||
39 | /** |
||
40 | * PublicKeyCredentialDescriptor constructor. |
||
41 | * |
||
42 | * @param string $type |
||
43 | * @param string $id |
||
44 | * @param string[] $transports |
||
45 | */ |
||
46 | public function __construct(string $type, string $id, array $transports) |
||
47 | { |
||
48 | $this->type = $type; |
||
49 | $this->id = $id; |
||
50 | $this->transports = $transports; |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getType(): string |
||
57 | { |
||
58 | return $this->type; |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * @return string |
||
63 | */ |
||
64 | public function getId(): string |
||
65 | { |
||
66 | return $this->id; |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * @return string[] |
||
71 | */ |
||
72 | public function getTransports(): array |
||
75 | } |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function jsonSerialize() |
||
86 | ]; |
||
87 | } |
||
88 | } |
||
89 |