-
Notifications
You must be signed in to change notification settings - Fork 6
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
chore: sonarcloud updates #845
Conversation
Generated by 🚫 Danger Swift against 4ab0f85 |
@@ -63,15 +63,15 @@ extension PrimerHeadlessKlarnaComponent: PrimerKlarnaProviderAuthorizationDelega | |||
*/ | |||
public func primerKlarnaWrapperAuthorized(approved: Bool, authToken: String?, finalizeRequired: Bool) { | |||
isFinalizationRequired = finalizeRequired | |||
if approved == false { | |||
if finalizeRequired == true { | |||
if approved { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)
@@ -25,10 +25,10 @@ extension PrimerHeadlessKlarnaComponent: PrimerKlarnaProviderFinalizationDelegat | |||
* - `authToken` - An optional `String` containing the authorization token, which is returned only if `approved` is `true`. | |||
*/ | |||
public func primerKlarnaWrapperFinalized(approved: Bool, authToken: String?) { | |||
if approved == false { | |||
if approved { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)
@@ -117,7 +117,7 @@ extension UnkeyedDecodingContainer { | |||
|
|||
mutating func decode(_ type: Array<Any>.Type) throws -> [Any] { | |||
var array: [Any] = [] | |||
while isAtEnd == false { | |||
while isAtEnd { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)
@@ -23,7 +23,7 @@ class ClientSessionActionsModule: ClientSessionActionsProtocol { | |||
return | |||
} | |||
|
|||
if (PrimerAPIConfigurationModule.apiConfiguration?.hasSurchargeEnabled ?? false) == false { | |||
if (PrimerAPIConfigurationModule.apiConfiguration?.hasSurchargeEnabled ?? false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)⚠️ if
,for
,guard
,switch
,while
, andcatch
statements shouldn't unnecessarily wrap their conditionals or arguments in parentheses. (control_statement
)
@@ -65,7 +65,7 @@ class ClientSessionActionsModule: ClientSessionActionsProtocol { | |||
return | |||
} | |||
|
|||
if (PrimerAPIConfigurationModule.apiConfiguration?.hasSurchargeEnabled ?? false) == false { | |||
if (PrimerAPIConfigurationModule.apiConfiguration?.hasSurchargeEnabled ?? false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)⚠️ if
,for
,guard
,switch
,while
, andcatch
statements shouldn't unnecessarily wrap their conditionals or arguments in parentheses. (control_statement
)
} | ||
} | ||
|
||
// swiftlint:disable cyclomatic_complexity | ||
fileprivate func showTexfieldViewErrorIfNeeded(for primerTextFieldView: PrimerTextFieldView, isValid: Bool?) { | ||
|
||
if isValid == false { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Lines should not have trailing whitespace. (trailing_whitespace
)
@@ -910,7 +909,7 @@ extension CardFormPaymentMethodTokenizationViewModel: PrimerTextFieldViewDelegat | |||
extension CardFormPaymentMethodTokenizationViewModel { | |||
|
|||
private func updateButtonUI() { | |||
if let amount = AppState.current.amount, self.uiModule.isSubmitButtonAnimating == false { | |||
if let amount = AppState.current.amount, self.uiModule.isSubmitButtonAnimating { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)
@@ -146,15 +146,15 @@ internal class PrimerUIManager { | |||
return | |||
} | |||
|
|||
if case .checkout = PrimerInternal.shared.intent, paymentMethod.isCheckoutEnabled == false { | |||
if case .checkout = PrimerInternal.shared.intent, paymentMethod.isCheckoutEnabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)
let err = PrimerError.unsupportedIntent( | ||
intent: .checkout, | ||
userInfo: .errorUserInfoDictionary(), | ||
diagnosticsId: UUID().uuidString) | ||
seal.reject(err) | ||
return | ||
|
||
} else if case .vault = PrimerInternal.shared.intent, paymentMethod.isVaultingEnabled == false { | ||
} else if case .vault = PrimerInternal.shared.intent, paymentMethod.isVaultingEnabled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)
@@ -245,7 +245,7 @@ class ApplePayTokenizationViewModel: PaymentMethodTokenizationViewModel { | |||
self.isCancelled = true | |||
|
|||
paymentController.present { success in | |||
if success == false { | |||
if success { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Opening braces should be preceded by a single space and on the same line as the declaration. (opening_brace
)
Description
CHKT-XXXX
Other Notes
Manual Testing
Add manual testing notes here if applicable, otherwise remove this section
Screenshots
If applicable, otherwise remove this section
Contributor Checklist
Reviewer Checklist
Before Merging
Other Stuff