Fixes static analysis
This commit is contained in:
@@ -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(),
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user