SwiftLint fixes. (#2899)

non_optional_string_data_conversion and static_over_final_class

* Revert Data -> String changes for upcoming rule change.
This commit is contained in:
Doug
2024-06-05 07:31:49 +01:00
committed by GitHub
parent 8498cbd039
commit c51593476c
7 changed files with 18 additions and 23 deletions
@@ -21,12 +21,12 @@ import UIKit
import DeviceKit
#endif
final class UserAgentBuilder {
class func makeASCIIUserAgent() -> String {
enum UserAgentBuilder {
static func makeASCIIUserAgent() -> String {
makeUserAgent()?.asciified() ?? "unknown"
}
private class func makeUserAgent() -> String? {
static func makeUserAgent() -> String? {
let clientName = InfoPlistReader.app.bundleDisplayName
let clientVersion = InfoPlistReader.app.bundleShortVersionString
@@ -502,7 +502,7 @@ class RoomScreenInteractionHandler {
}
guard let audioPlayerState = audioPlayerState(for: itemID) else {
fatalError("Audio player not found for \(itemID)")
fatalError("Audio player state not found for \(itemID)")
}
// Ensure this one is attached
@@ -160,7 +160,7 @@ class MockScreen: Identifiable {
let context = LAContextMock()
context.biometryTypeValue = UIDevice.current.isPhone ? .faceID : .touchID // (iPhone 14 & iPad 9th gen)
context.evaluatePolicyReturnValue = true
context.evaluatedPolicyDomainStateValue = "😎".data(using: .utf8)
context.evaluatedPolicyDomainStateValue = Data("😎".utf8)
let appLockService = AppLockService(keychainController: keychainController,
appSettings: ServiceLocator.shared.settings,
@@ -215,7 +215,7 @@ class MockScreen: Identifiable {
let context = LAContextMock()
context.biometryTypeValue = UIDevice.current.isPhone ? .faceID : .touchID // (iPhone 14 & iPad 9th gen)
context.evaluatePolicyReturnValue = true
context.evaluatedPolicyDomainStateValue = "😎".data(using: .utf8)
context.evaluatedPolicyDomainStateValue = Data("😎".utf8)
let appLockService = AppLockService(keychainController: keychainController,
appSettings: ServiceLocator.shared.settings,