Maintenance: Updated PHPStan to Level 4 (#6085)

This commit is contained in:
Dan Brown
2026-04-08 21:03:20 +01:00
committed by GitHub
parent c33853ed84
commit 5e78dc6ed5
34 changed files with 105 additions and 102 deletions

View File

@@ -48,17 +48,16 @@ class MfaValue extends Model
}
/**
* Easily get the decrypted MFA value for the given user and method.
* Get the decrypted MFA value for the given user and method.
*/
public static function getValueForUser(User $user, string $method): ?string
{
/** @var MfaValue $mfaVal */
$mfaVal = static::query()
->where('user_id', '=', $user->id)
->where('method', '=', $method)
->first();
return $mfaVal ? $mfaVal->getValue() : null;
return $mfaVal?->getValue();
}
/**