Fixes static analysis

This commit is contained in:
Italo
2022-07-27 14:22:05 -04:00
committed by GitHub
parent 21db20d103
commit 8277b1dd36
15 changed files with 33 additions and 15 deletions

View File

@@ -366,13 +366,21 @@ class AuthenticatorData
protected static function readFlags(string $binFlag): object
{
$flags = (object) [
// @phpstan-ignore-next-line
'bit_0' => (bool) ($binFlag & 1),
// @phpstan-ignore-next-line
'bit_1' => (bool) ($binFlag & 2),
// @phpstan-ignore-next-line
'bit_2' => (bool) ($binFlag & 4),
// @phpstan-ignore-next-line
'bit_3' => (bool) ($binFlag & 8),
// @phpstan-ignore-next-line
'bit_4' => (bool) ($binFlag & 16),
// @phpstan-ignore-next-line
'bit_5' => (bool) ($binFlag & 32),
// @phpstan-ignore-next-line
'bit_6' => (bool) ($binFlag & 64),
// @phpstan-ignore-next-line
'bit_7' => (bool) ($binFlag & 128),
'userPresent' => false,
'userVerified' => false,

View File

@@ -23,6 +23,7 @@ class AddUserDescriptor
$config = $attestable->user->webAuthnData();
// Create a new User UUID if it doesn't existe already in the credentials.
// @phpstan-ignore-next-line
$config['id'] = $attestable->user->webAuthnCredentials()->value('user_id')
?: Str::uuid()->getHex()->toString();

View File

@@ -39,6 +39,7 @@ class MayPreventDuplicateCredentials
return $user
->webAuthnCredentials()
->get(['id', 'transports'])
// @phpstan-ignore-next-line
->map(static function (WebAuthnCredential $credential): array {
return array_filter([
'id'=> $credential->getKey(),