Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NachoSoto committed Nov 30, 2021
1 parent 7125c86 commit 9796a61
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Purchases/Caching/DeviceCache.swift
Expand Up @@ -500,25 +500,31 @@ fileprivate extension UserDefaults {
}

private extension DeviceCache {

enum CacheDuration {

// swiftlint:disable:next nesting
enum AppStatus {

case foreground
case background

init(backgrounded: Bool) {
self = backgrounded ? .background : .foreground
}

}

// swiftlint:disable:next nesting
enum Environment {

case production
case sandbox

init(sandbox: Bool) {
self = sandbox ? .sandbox : .production
}

}

static func duration(status: AppStatus, environment: Environment) -> TimeInterval {
Expand All @@ -530,7 +536,9 @@ private extension DeviceCache {
case (.sandbox, .background): return 60 * 5.0
}
}

}

}

// swiftlint:enable file_length

0 comments on commit 9796a61

Please sign in to comment.