Skip to content

Commit cb2f5df

Browse files
author
Sharma Elanthiriayan
committed
OrdersUpsertUseCase
- Format comments in `handleOrderTaxes` method.
1 parent fcd19ef commit cb2f5df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Yosemite/Yosemite/Stores/Order/OrdersUpsertUseCase.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,10 @@ struct OrdersUpsertUseCase {
260260
}
261261
}
262262

263-
/// Updates, inserts, or prunes the provided StorageOrder's taxes using the provided read-only Order's taxes
263+
/// Updates, inserts, or prunes the provided `storageOrder`'s taxes using the provided `readOnlyOrder`'s taxes
264264
///
265265
private func handleOrderTaxes(_ readOnlyOrder: Networking.Order, _ storageOrder: Storage.Order, _ storage: StorageType) {
266-
// Upsert the taxes from the read-only order
266+
// Upsert the `taxes` from the `readOnlyOrder`
267267
readOnlyOrder.taxes.forEach { readOnlyTax in
268268
if let existingStorageTax = storage.loadOrderTaxLine(siteID: readOnlyOrder.siteID, taxID: readOnlyTax.taxID) {
269269
existingStorageTax.update(with: readOnlyTax)
@@ -274,7 +274,7 @@ struct OrdersUpsertUseCase {
274274
}
275275
}
276276

277-
// Now, remove any objects that exist in storageOrder.taxes but not in readOnlyOrder.taxes
277+
// Now, remove any objects that exist in `storageOrder.taxes` but not in `readOnlyOrder.taxes`
278278
storageOrder.taxes?.forEach { storageFee in
279279
if readOnlyOrder.taxes.first(where: { $0.taxID == storageFee.taxID } ) == nil {
280280
storageOrder.removeFromTaxes(storageFee)

0 commit comments

Comments
 (0)