Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | 7 | private function setId(ByteBuffer $id): void |
|
42 | { |
||
43 | 7 | if ($id->isEmpty()) { |
|
44 | 1 | throw new WebAuthnException('User handle cannot be empty.'); |
|
45 | } |
||
46 | |||
47 | 6 | if ($id->getLength() > UserHandle::MAX_USER_HANDLE_BYTES) { |
|
48 | 1 | throw new WebAuthnException(sprintf('User handle cannot be larger than %d bytes.', UserHandle::MAX_USER_HANDLE_BYTES)); |
|
49 | } |
||
50 | 5 | $this->id = $id; |
|
51 | 5 | } |
|
69 |