diff --git a/src/ByteBuffer.php b/src/ByteBuffer.php index f1db6fc..9b9aca7 100644 --- a/src/ByteBuffer.php +++ b/src/ByteBuffer.php @@ -415,7 +415,9 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable */ public static function fromBase64(string $base64): static { - if (false === $bin = base64_decode($base64)) { + $bin = base64_decode($base64); + + if (false === $bin) { throw new InvalidArgumentException('ByteBuffer: Invalid base64 string'); } diff --git a/src/CborDecoder.php b/src/CborDecoder.php index db752e0..a0e887a 100644 --- a/src/CborDecoder.php +++ b/src/CborDecoder.php @@ -138,9 +138,9 @@ class CborDecoder $val = static::parseExtraLength($val, $buf, $offset); + // @phpstan-ingnore-next-line try { return static::parseItemData($type, $val, $buf, $offset); - // @phpstan-ingnore-next-line } catch (InvalidArgumentException $e) { throw new DataException($e->getMessage()); } diff --git a/src/Contracts/WebAuthnAuthenticatable.php b/src/Contracts/WebAuthnAuthenticatable.php index dccaa1a..d76edcc 100644 --- a/src/Contracts/WebAuthnAuthenticatable.php +++ b/src/Contracts/WebAuthnAuthenticatable.php @@ -41,6 +41,7 @@ interface WebAuthnAuthenticatable /** * Returns a queryable relationship for its WebAuthn Credentials. * + * @phpstan-ignore-next-line * @return \Illuminate\Database\Eloquent\Relations\MorphMany|\Laragear\WebAuthn\Models\WebAuthnCredential */ public function webAuthnCredentials(): MorphMany; diff --git a/src/Http/Requests/AssertedRequest.php b/src/Http/Requests/AssertedRequest.php index a912890..d8d68e4 100644 --- a/src/Http/Requests/AssertedRequest.php +++ b/src/Http/Requests/AssertedRequest.php @@ -48,11 +48,12 @@ class AssertedRequest extends FormRequest * Logs in the user for this assertion request. * * @param string|null $guard + * @phpstan-ignore-next-line * @return \Laragear\WebAuthn\Contracts\WebAuthnAuthenticatable|\Illuminate\Contracts\Auth\Authenticatable|null */ public function login(string $guard = null, bool $remember = null, bool $destroySession = false): ?WebAuthnAuthenticatable { - /** @var \Illuminate\Contracts\Auth\StatefulGuard $guard */ + /** @var \Illuminate\Contracts\Auth\StatefulGuard $auth */ $auth = Auth::guard($guard); if ($auth->attempt($this->validated(), $remember ?? $this->hasRemember())) {