Skip to content

Commit 44bd143

Browse files
committed
chore: Applied SwiftFormat.
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
1 parent 020b921 commit 44bd143

3 files changed

Lines changed: 15 additions & 19 deletions

File tree

Sources/NextcloudFileProviderKit/Database/FilesDatabaseManager.swift

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,19 +205,15 @@ public final class FilesDatabaseManager: Sendable {
205205
// changes in the db.
206206
//
207207
// Let's therefore create a copy
208-
if let itemMetadata = itemMetadatas
209-
.where({
210-
$0.ocId == ocId
211-
})
212-
.first {
213-
return SendableItemMetadata(value: itemMetadata)
214-
}
208+
if let itemMetadata = itemMetadatas.where({ $0.ocId == ocId }).first {
209+
return SendableItemMetadata(value: itemMetadata)
210+
}
215211

216212
return nil
217213
}
218214

219215
public func itemMetadata(_ identifier: NSFileProviderItemIdentifier) -> SendableItemMetadata? {
220-
return itemMetadata(ocId: identifier.rawValue)
216+
itemMetadata(ocId: identifier.rawValue)
221217
}
222218

223219
///

Sources/NextcloudFileProviderKitMocks/TestableRemoteInterface.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ public struct TestableRemoteInterface: RemoteInterface {
7878
) async -> (account: String, data: Data?, error: NKError) { ("", nil, .invalidResponseError) }
7979

8080
public func downloadAsync(
81-
serverUrlFileName: Any,
82-
fileNameLocalPath: String,
83-
account: String,
84-
options: NKRequestOptions,
85-
requestHandler: @escaping (_ request: DownloadRequest) -> Void,
86-
taskHandler: @escaping (_ task: URLSessionTask) -> Void,
87-
progressHandler: @escaping (_ progress: Progress) -> Void
81+
serverUrlFileName _: Any,
82+
fileNameLocalPath _: String,
83+
account _: String,
84+
options _: NKRequestOptions,
85+
requestHandler _: @escaping (_ request: DownloadRequest) -> Void,
86+
taskHandler _: @escaping (_ task: URLSessionTask) -> Void,
87+
progressHandler _: @escaping (_ progress: Progress) -> Void
8888
) async -> (
8989
account: String,
9090
etag: String?,

Tests/Interface/MockRemoteInterface.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -996,10 +996,10 @@ public class MockRemoteInterface: RemoteInterface {
996996
serverUrlFileName: Any,
997997
fileNameLocalPath: String,
998998
account: String,
999-
options: NKRequestOptions,
1000-
requestHandler: @escaping (_ request: DownloadRequest) -> Void,
1001-
taskHandler: @escaping (_ task: URLSessionTask) -> Void,
1002-
progressHandler: @escaping (_ progress: Progress) -> Void
999+
options _: NKRequestOptions,
1000+
requestHandler _: @escaping (_ request: DownloadRequest) -> Void,
1001+
taskHandler _: @escaping (_ task: URLSessionTask) -> Void,
1002+
progressHandler _: @escaping (_ progress: Progress) -> Void
10031003
) async -> (
10041004
account: String,
10051005
etag: String?,

0 commit comments

Comments
 (0)