From 3225e300cd55364c715968409bf5fb29c54d6a45 Mon Sep 17 00:00:00 2001 From: Italo Date: Wed, 27 Jul 2022 15:01:18 -0400 Subject: [PATCH] Fixes static analysis --- src/Assertion/Creator/Pipes/MayRetrieveCredentialsIdForUser.php | 2 +- src/Models/WebAuthnCredential.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Assertion/Creator/Pipes/MayRetrieveCredentialsIdForUser.php b/src/Assertion/Creator/Pipes/MayRetrieveCredentialsIdForUser.php index 2b6b16d..d5527e9 100644 --- a/src/Assertion/Creator/Pipes/MayRetrieveCredentialsIdForUser.php +++ b/src/Assertion/Creator/Pipes/MayRetrieveCredentialsIdForUser.php @@ -36,11 +36,11 @@ class MayRetrieveCredentialsIdForUser * Adapt all credentials into an `allowCredentials` digestible array. * * @param \Illuminate\Database\Eloquent\Collection $credentials - * @phpstan-ignore-next-line * @return \Illuminate\Support\Collection}> */ protected function parseCredentials(EloquentCollection $credentials): Collection { + // @phpstan-ignore-next-line return $credentials->map(static function (WebAuthnCredential $credential): array { return array_filter([ 'id' => $credential->getKey(), diff --git a/src/Models/WebAuthnCredential.php b/src/Models/WebAuthnCredential.php index b3df3e1..701a92d 100644 --- a/src/Models/WebAuthnCredential.php +++ b/src/Models/WebAuthnCredential.php @@ -98,11 +98,11 @@ class WebAuthnCredential extends Model protected $visible = ['id', 'origin', 'alias', 'aaguid', 'attestation_format', 'disabled_at', 'is_enabled']; /** + * @phpstan-ignore-next-line * @return \Illuminate\Database\Eloquent\Relations\MorphTo|\Laragear\WebAuthn\Contracts\WebAuthnAuthenticatable */ public function authenticatable(): MorphTo { - // @phpstan-ignore-next-line return $this->morphTo('authenticatable'); }