Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the code formatting #67

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ All notable changes to this project will be documented in this file.
- Implement currencySymbol for StoreProduct
- Added in Pull Request [#66](https://github.com/space-code/flare/pull/66).

## Fixed
- Fix the code formatting
- Fixed in Pull Request [#67](https://github.com/space-code/flare/pull/67)

## [3.0.1](https://github.com/space-code/flare/releases/tag/3.0.1)
Released on 2024-08-09.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/Flare/Classes/Extensions/ProductType+.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import StoreKit

private var requestIdKey: UInt = 0

internal extension SKRequest {
extension SKRequest {
var id: String {
get {
objc_getAssociatedObject(self, &requestIdKey) as? String ?? ""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/Flare/Classes/Models/IAPError.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import StoreKit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protocol ISKProduct {

/// The currency code for the product's price.
var currencyCode: String? { get }

/// The currency Symbol for the product's price.
var currencySymbol: String? { get }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protocol IStoreProductDiscount: Sendable {

/// The discounted price in the specified currency.
var price: Decimal { get }

/// A localized string representing the price of the product.
var localizedPriceString: String? { get }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ extension SK1StoreProduct: ISKProduct {
var currencyCode: String? {
product.priceLocale.currencyCodeID
}

var currencySymbol: String? {
numberFormatter.currencySymbol
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct SK1StoreProductDiscount: IStoreProductDiscount {

/// The discounted price in the specified currency.
let price: Decimal

/// A localized string representing the price of the product.
let localizedPriceString: String?

Expand Down Expand Up @@ -59,7 +59,7 @@ struct SK1StoreProductDiscount: IStoreProductDiscount {
self.subscriptionPeriod = subscriptionPeriod
numberOfPeriods = productDiscount.numberOfPeriods
type = discountType

/// The price formatter.
let numberFormatter: NumberFormatter = .numberFormatter(with: self.productDiscount.priceLocale)
localizedPriceString = numberFormatter.string(from: self.productDiscount.price)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import StoreKit
Expand Down
4 changes: 2 additions & 2 deletions Sources/Flare/Classes/Models/Internal/SK2StoreProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ final class SK2StoreProduct {
private var currencyFormat: Decimal.FormatStyle.Currency {
product.priceFormatStyle
}

/// The price formatter.
private lazy var numberFormatter: NumberFormatter = .numberFormatter(with: self.currencyFormat.locale)

Expand All @@ -45,7 +45,7 @@ extension SK2StoreProduct: ISKProduct {
var currencyCode: String? {
currencyFormat.currencyCode
}

var currencySymbol: String? {
numberFormatter.currencySymbol
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct SK2StoreProductDiscount: IStoreProductDiscount, Sendable {

/// The discounted price in the specified currency.
let price: Decimal

/// A localized string representing the price of the product.
let localizedPriceString: String?

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/Flare/Classes/Models/ProductType.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Sources/Flare/Classes/Models/StoreProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ extension StoreProduct: ISKProduct {
public var currencyCode: String? {
product.currencyCode
}

public var currencySymbol: String? {
product.currencySymbol
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Flare/Classes/Models/StoreProductDiscount.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ extension StoreProductDiscount: IStoreProductDiscount {
public var price: Decimal {
discount.price
}

public var localizedPriceString: String? {
discount.localizedPriceString
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import Concurrency
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import StoreKit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import Atomic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import Concurrency
Expand Down
4 changes: 2 additions & 2 deletions Sources/FlareMock/Mocks/ProductMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public final class ProductMock: ISKProduct {
invokedCurrencyCodeGetterCount += 1
return stubbedCurrencyCode
}

public var invokedCurrencySymbolGetter = false
public var invokedCurrencySymbolGetterCount = 0
public var stubbedCurrencySymbol: String!

public var currencySymbol: String? {
invokedCurrencySymbolGetter = true
invokedCurrencySymbolGetterCount += 1
Expand Down
2 changes: 1 addition & 1 deletion Tests/FlareTests/UnitTests/FlareTests.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

@testable import Flare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

@testable import Flare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import Concurrency
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

@testable import Flare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import XCTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

@testable import Flare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import XCTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

@testable import Flare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

#if os(iOS) || VISION_OS
import UIKit

final class WindowSceneFactory {
enum WindowSceneFactory {
static func makeWindowScene() -> UIWindowScene {
UIApplication.shared.connectedScenes.first as! UIWindowScene
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import StoreKit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

@testable import Flare
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

@testable import Flare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ final class SubscriptionsPresenterTests: XCTestCase {
// MARK: - Extensions

private extension Array where Element == String {
static let ids: [String] = ["subscription"]
static let ids = ["subscription"]
}
2 changes: 1 addition & 1 deletion Tests/IntegrationTests/Helpers/Extensions/Result+.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import XCTest
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTestHostApp/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Flare
// Copyright © 2023 Space Code. All rights reserved.
// Copyright © 2024 Space Code. All rights reserved.
//

import SwiftUI
Expand Down
Loading