Fixes static analysis

This commit is contained in:
Italo
2022-07-27 15:01:18 -04:00
committed by GitHub
parent 397f119432
commit 3225e300cd
2 changed files with 2 additions and 2 deletions

View File

@@ -36,11 +36,11 @@ class MayRetrieveCredentialsIdForUser
* Adapt all credentials into an `allowCredentials` digestible array.
*
* @param \Illuminate\Database\Eloquent\Collection<int, \Laragear\WebAuthn\Models\WebAuthnCredential> $credentials
* @phpstan-ignore-next-line
* @return \Illuminate\Support\Collection<int, array{id?: mixed, type: string, transports?: non-empty-array<int, string>}>
*/
protected function parseCredentials(EloquentCollection $credentials): Collection
{
// @phpstan-ignore-next-line
return $credentials->map(static function (WebAuthnCredential $credential): array {
return array_filter([
'id' => $credential->getKey(),

View File

@@ -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');
}