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