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. * Adapt all credentials into an `allowCredentials` digestible array.
* *
* @param \Illuminate\Database\Eloquent\Collection<int, \Laragear\WebAuthn\Models\WebAuthnCredential> $credentials * @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>}> * @return \Illuminate\Support\Collection<int, array{id?: mixed, type: string, transports?: non-empty-array<int, string>}>
*/ */
protected function parseCredentials(EloquentCollection $credentials): Collection protected function parseCredentials(EloquentCollection $credentials): Collection
{ {
// @phpstan-ignore-next-line
return $credentials->map(static function (WebAuthnCredential $credential): array { return $credentials->map(static function (WebAuthnCredential $credential): array {
return array_filter([ return array_filter([
'id' => $credential->getKey(), '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']; 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 * @return \Illuminate\Database\Eloquent\Relations\MorphTo|\Laragear\WebAuthn\Contracts\WebAuthnAuthenticatable
*/ */
public function authenticatable(): MorphTo public function authenticatable(): MorphTo
{ {
// @phpstan-ignore-next-line
return $this->morphTo('authenticatable'); return $this->morphTo('authenticatable');
} }