Format code with SwiftFormat automatically in every build

This commit is contained in:
Danny Moesch 2020-06-28 21:25:40 +02:00 committed by Mingshen Sun
parent f167ab7549
commit 7f9f0e43b2
100 changed files with 1124 additions and 1063 deletions

View file

@ -10,7 +10,6 @@ import Foundation
import SwiftyUserDefaults
extension PasswordEntity {
public var nameWithCategory: String {
if let p = path, p.hasSuffix(".gpg") {
return String(p.prefix(upTo: p.index(p.endIndex, offsetBy: -4)))
@ -19,7 +18,7 @@ extension PasswordEntity {
}
public func getCategoryText() -> String {
return getCategoryArray().joined(separator: " > ")
getCategoryArray().joined(separator: " > ")
}
public func getCategoryArray() -> [String] {
@ -44,17 +43,16 @@ extension PasswordEntity {
// manually write models instead auto generation.
public func getImage() -> Data? {
return image
image
}
public func getName() -> String {
// unwrap non-optional core data
return name ?? ""
name ?? ""
}
public func getPath() -> String {
// unwrap non-optional core data
return path ?? ""
path ?? ""
}
}