Fixes static analysis
This commit is contained in:
@@ -36,6 +36,7 @@ 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
|
||||
|
||||
@@ -415,6 +415,7 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable
|
||||
*/
|
||||
public static function fromBase64(string $base64): static
|
||||
{
|
||||
/** @var string|false $bin */
|
||||
$bin = base64_decode($base64);
|
||||
|
||||
if (false === $bin) {
|
||||
|
||||
@@ -138,7 +138,6 @@ class CborDecoder
|
||||
|
||||
$val = static::parseExtraLength($val, $buf, $offset);
|
||||
|
||||
// @phpstan-ingnore-next-line
|
||||
try {
|
||||
return static::parseItemData($type, $val, $buf, $offset);
|
||||
} catch (InvalidArgumentException $e) {
|
||||
@@ -249,7 +248,7 @@ class CborDecoder
|
||||
* @param \Laragear\WebAuthn\ByteBuffer $buf
|
||||
* @param $offset
|
||||
* @return \Laragear\WebAuthn\ByteBuffer|array|bool|float|int|string|null
|
||||
* @throws \Laragear\WebAuthn\Exceptions\DataException
|
||||
* @throws \Laragear\WebAuthn\Exceptions\DataException|\InvalidArgumentException
|
||||
*/
|
||||
protected static function parseItemData(
|
||||
int $type,
|
||||
|
||||
@@ -59,6 +59,7 @@ class AssertedRequest extends FormRequest
|
||||
if ($auth->attempt($this->validated(), $remember ?? $this->hasRemember())) {
|
||||
$this->session()->regenerate($destroySession);
|
||||
|
||||
// @phpstan-ignore-next-line
|
||||
return $auth->user();
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ class WebAuthnCredential extends Model
|
||||
*/
|
||||
public function authenticatable(): MorphTo
|
||||
{
|
||||
// @phpstan-ignore-next-line
|
||||
return $this->morphTo('authenticatable');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user