Enable SwiftLint rule 'lower_acl_than_parent' and fix all violations
This commit is contained in:
parent
1b3a8ff0d8
commit
b4c25726a5
5 changed files with 20 additions and 19 deletions
|
|
@ -92,7 +92,7 @@ whitelist_rules:
|
|||
- let_var_whitespace
|
||||
# - line_length
|
||||
- literal_expression_end_indentation
|
||||
# - lower_acl_than_parent
|
||||
- lower_acl_than_parent
|
||||
- mark
|
||||
# - missing_docs
|
||||
- modifier_order
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@
|
|||
import Foundation
|
||||
import UIKit
|
||||
|
||||
class SecurePasteboard {
|
||||
public class SecurePasteboard {
|
||||
public static let shared = SecurePasteboard()
|
||||
|
||||
private var backgroundTaskID = UIBackgroundTaskIdentifier.invalid
|
||||
|
||||
func copy(textToCopy: String?, expirationTime: Double = 45) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import passKit
|
|||
class PasscodeLockViewControllerForExtension: PasscodeLockViewController {
|
||||
var originalExtensionContest: ASCredentialProviderExtensionContext?
|
||||
|
||||
public convenience init(extensionContext: ASCredentialProviderExtensionContext?) {
|
||||
convenience init(extensionContext: ASCredentialProviderExtensionContext?) {
|
||||
self.init()
|
||||
self.originalExtensionContest = extensionContext
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ class PasscodeExtensionDisplay {
|
|||
private let passcodeLockVC: PasscodeLockViewControllerForExtension
|
||||
private let extensionContext: ASCredentialProviderExtensionContext?
|
||||
|
||||
public init(extensionContext: ASCredentialProviderExtensionContext?) {
|
||||
init(extensionContext: ASCredentialProviderExtensionContext?) {
|
||||
self.extensionContext = extensionContext
|
||||
self.passcodeLockVC = PasscodeLockViewControllerForExtension(extensionContext: extensionContext)
|
||||
passcodeLockVC.dismissCompletionCallback = { [weak self] in
|
||||
|
|
@ -46,7 +46,7 @@ class PasscodeExtensionDisplay {
|
|||
}
|
||||
|
||||
// present the passcode lock view if passcode is set and the view controller is not presented
|
||||
public func presentPasscodeLockIfNeeded(_ extensionVC: UIViewController) {
|
||||
func presentPasscodeLockIfNeeded(_ extensionVC: UIViewController) {
|
||||
guard PasscodeLock.shared.hasPasscode, !isPasscodePresented == true else {
|
||||
return
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ class PasscodeExtensionDisplay {
|
|||
extensionVC.present(passcodeLockVC, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
public func dismiss(animated _: Bool = true) {
|
||||
func dismiss(animated _: Bool = true) {
|
||||
isPasscodePresented = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import passKit
|
|||
class PasscodeLockViewControllerForExtension: PasscodeLockViewController {
|
||||
var originalExtensionContest: NSExtensionContext?
|
||||
|
||||
public convenience init(extensionContext: NSExtensionContext?) {
|
||||
convenience init(extensionContext: NSExtensionContext?) {
|
||||
self.init()
|
||||
self.originalExtensionContest = extensionContext
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ class PasscodeExtensionDisplay {
|
|||
private let passcodeLockVC: PasscodeLockViewControllerForExtension
|
||||
private let extensionContext: NSExtensionContext?
|
||||
|
||||
public init(extensionContext: NSExtensionContext?) {
|
||||
init(extensionContext: NSExtensionContext?) {
|
||||
self.extensionContext = extensionContext
|
||||
self.passcodeLockVC = PasscodeLockViewControllerForExtension(extensionContext: extensionContext)
|
||||
passcodeLockVC.dismissCompletionCallback = { [weak self] in
|
||||
|
|
@ -45,7 +45,7 @@ class PasscodeExtensionDisplay {
|
|||
}
|
||||
|
||||
// present the passcode lock view if passcode is set and the view controller is not presented
|
||||
public func presentPasscodeLockIfNeeded(_ extensionVC: UIViewController) {
|
||||
func presentPasscodeLockIfNeeded(_ extensionVC: UIViewController) {
|
||||
guard PasscodeLock.shared.hasPasscode, !isPasscodePresented == true else {
|
||||
return
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ class PasscodeExtensionDisplay {
|
|||
extensionVC.present(passcodeLockVC, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
public func dismiss(animated _: Bool = true) {
|
||||
func dismiss(animated _: Bool = true) {
|
||||
isPasscodePresented = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,31 +12,31 @@ import passKit
|
|||
class DictBasedKeychain: KeyStore {
|
||||
private var store: [String: Any] = [:]
|
||||
|
||||
public func add(data: Data?, for key: String) {
|
||||
func add(data: Data?, for key: String) {
|
||||
store[key] = data
|
||||
}
|
||||
|
||||
public func add(string: String?, for key: String) {
|
||||
func add(string: String?, for key: String) {
|
||||
store[key] = string
|
||||
}
|
||||
|
||||
public func contains(key: String) -> Bool {
|
||||
func contains(key: String) -> Bool {
|
||||
store[key] != nil
|
||||
}
|
||||
|
||||
public func get(for key: String) -> Data? {
|
||||
func get(for key: String) -> Data? {
|
||||
store[key] as? Data
|
||||
}
|
||||
|
||||
public func get(for key: String) -> String? {
|
||||
func get(for key: String) -> String? {
|
||||
store[key] as? String
|
||||
}
|
||||
|
||||
public func removeContent(for key: String) {
|
||||
func removeContent(for key: String) {
|
||||
store.removeValue(forKey: key)
|
||||
}
|
||||
|
||||
public func removeAllContent() {
|
||||
func removeAllContent() {
|
||||
store.removeAll()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue