From 87f001c166821abe48e994de70db96f1f01092ca Mon Sep 17 00:00:00 2001 From: makinosp Date: Mon, 4 Nov 2024 21:33:55 +0900 Subject: [PATCH] refact: lint --- Sources/VRCKit/Models/World/InstanceModel.swift | 2 +- .../VRCKit/Protocols/AuthenticationServiceProtocol.swift | 8 ++++---- .../VRCKit/Protocols/ImageUrlRepresentableProtocol.swift | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Sources/VRCKit/Models/World/InstanceModel.swift b/Sources/VRCKit/Models/World/InstanceModel.swift index d774fb1..784141e 100644 --- a/Sources/VRCKit/Models/World/InstanceModel.swift +++ b/Sources/VRCKit/Models/World/InstanceModel.swift @@ -95,7 +95,7 @@ public extension Instance { public extension Instance.Platforms { /// Initialize from an array of UserPlatform /// - Parameter platforms: An array of UserPlatform - init(platforms: [UserPlatform]) { + init(_ platforms: [UserPlatform]) { self.init( android: platforms.contains(.android) ? 1 : 0, ios: platforms.contains(.ios) ? 1 : 0, diff --git a/Sources/VRCKit/Protocols/AuthenticationServiceProtocol.swift b/Sources/VRCKit/Protocols/AuthenticationServiceProtocol.swift index 65e9c28..57cdbdd 100644 --- a/Sources/VRCKit/Protocols/AuthenticationServiceProtocol.swift +++ b/Sources/VRCKit/Protocols/AuthenticationServiceProtocol.swift @@ -12,10 +12,10 @@ public protocol AuthenticationServiceProtocol: Sendable { /// - Returns: A boolean indicating if the user exists. func exists(userId: String) async throws -> Bool - /// Fetches the authenticated user's information or determines if two-factor authentication (2FA) verification is required. - /// - Returns: An `Either` result, which is `.left(User)` if the user is successfully authenticated, - /// - Throws: An error if the request fails or if the response cannot be decoded. If an unexpected decoding issue occurs, - /// it throws `VRCKitError.unexpected`. + /// Fetches the authenticated user's information or determines if 2FA verification is required. + /// - Returns: An `Either` result. + /// - Throws: An error if the request fails or if the response cannot be decoded. + /// If an unexpected decoding issue occurs,it throws `VRCKitError.unexpected`. func loginUserInfo() async throws -> Either /// Verifies 2-factor authentication using either TOTP or Email OTP. diff --git a/Sources/VRCKit/Protocols/ImageUrlRepresentableProtocol.swift b/Sources/VRCKit/Protocols/ImageUrlRepresentableProtocol.swift index c8e10a3..5bb0669 100644 --- a/Sources/VRCKit/Protocols/ImageUrlRepresentableProtocol.swift +++ b/Sources/VRCKit/Protocols/ImageUrlRepresentableProtocol.swift @@ -12,7 +12,8 @@ public protocol ImageUrlRepresentable: Sendable { /// /// - Parameters: /// - url: The original image URL to modify. - /// - resolution: The desired image resolution as an `ImageResolution` value. The original resolution is `.origin`. + /// - resolution: The desired image resolution as an `ImageResolution` value. + /// The original resolution is `.origin`. /// /// - Returns: A new URL with the last numeric component replaced by the specified resolution. func imageUrl(_ resolution: ImageResolution) -> URL?