Fixes stati analysis
This commit is contained in:
@@ -415,7 +415,9 @@ class ByteBuffer implements JsonSerializable, Jsonable, Stringable
|
|||||||
*/
|
*/
|
||||||
public static function fromBase64(string $base64): static
|
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');
|
throw new InvalidArgumentException('ByteBuffer: Invalid base64 string');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -138,9 +138,9 @@ class CborDecoder
|
|||||||
|
|
||||||
$val = static::parseExtraLength($val, $buf, $offset);
|
$val = static::parseExtraLength($val, $buf, $offset);
|
||||||
|
|
||||||
|
// @phpstan-ingnore-next-line
|
||||||
try {
|
try {
|
||||||
return static::parseItemData($type, $val, $buf, $offset);
|
return static::parseItemData($type, $val, $buf, $offset);
|
||||||
// @phpstan-ingnore-next-line
|
|
||||||
} catch (InvalidArgumentException $e) {
|
} catch (InvalidArgumentException $e) {
|
||||||
throw new DataException($e->getMessage());
|
throw new DataException($e->getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ interface WebAuthnAuthenticatable
|
|||||||
/**
|
/**
|
||||||
* Returns a queryable relationship for its WebAuthn Credentials.
|
* Returns a queryable relationship for its WebAuthn Credentials.
|
||||||
*
|
*
|
||||||
|
* @phpstan-ignore-next-line
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\MorphMany|\Laragear\WebAuthn\Models\WebAuthnCredential
|
* @return \Illuminate\Database\Eloquent\Relations\MorphMany|\Laragear\WebAuthn\Models\WebAuthnCredential
|
||||||
*/
|
*/
|
||||||
public function webAuthnCredentials(): MorphMany;
|
public function webAuthnCredentials(): MorphMany;
|
||||||
|
|||||||
@@ -48,11 +48,12 @@ class AssertedRequest extends FormRequest
|
|||||||
* Logs in the user for this assertion request.
|
* Logs in the user for this assertion request.
|
||||||
*
|
*
|
||||||
* @param string|null $guard
|
* @param string|null $guard
|
||||||
|
* @phpstan-ignore-next-line
|
||||||
* @return \Laragear\WebAuthn\Contracts\WebAuthnAuthenticatable|\Illuminate\Contracts\Auth\Authenticatable|null
|
* @return \Laragear\WebAuthn\Contracts\WebAuthnAuthenticatable|\Illuminate\Contracts\Auth\Authenticatable|null
|
||||||
*/
|
*/
|
||||||
public function login(string $guard = null, bool $remember = null, bool $destroySession = false): ?WebAuthnAuthenticatable
|
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);
|
$auth = Auth::guard($guard);
|
||||||
|
|
||||||
if ($auth->attempt($this->validated(), $remember ?? $this->hasRemember())) {
|
if ($auth->attempt($this->validated(), $remember ?? $this->hasRemember())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user