-
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
Changes from 5 commits
6601a02
2d7d720
1f8f14b
bc96f27
af3a9a5
0d92391
0323485
b909496
23da36a
9fd3d5c
132ad99
c5fb8d7
6f0cbe0
8185614
360dca5
f255a6d
082de5c
2559125
65bf4e1
964f370
969e800
f00a77a
2186ccc
d7b0627
e53f5be
4ab0f85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
createSessionError(.klarnaFinalizationFailed) | ||
} | ||
if let authToken = authToken, approved == true { | ||
if let authToken = authToken, approved { | ||
if PrimerInternal.shared.sdkIntegrationType == .headless { | ||
finalizeSession(token: authToken, fromAuthorization: false) | ||
} else { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,7 @@ extension KeyedDecodingContainer { | |
guard contains(key) else { | ||
return nil | ||
} | ||
guard try decodeNil(forKey: key) == false else { | ||
guard try decodeNil(forKey: key) else { | ||
return nil | ||
} | ||
return try decode(type, forKey: key) | ||
|
@@ -85,7 +85,7 @@ extension KeyedDecodingContainer { | |
guard contains(key) else { | ||
return nil | ||
} | ||
guard try decodeNil(forKey: key) == false else { | ||
guard try decodeNil(forKey: key) else { | ||
return nil | ||
} | ||
return try decode(type, forKey: key) | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
// See if the current value in the JSON array is `null` first and prevent infite recursion with nested arrays. | ||
if try decodeNil() { | ||
continue | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
seal.fulfill() | ||
return | ||
} | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
seal.fulfill() | ||
return | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,7 +179,7 @@ internal class URLSessionStack: NetworkService, LogReporter { | |
} | ||
#endif | ||
|
||
if endpoint.shouldParseResponseBody == false, httpResponse?.statusCode == 200 { | ||
if endpoint.shouldParseResponseBody , httpResponse?.statusCode == 200 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
guard let dummyRes: T = DummySuccess(success: true) as? T | ||
else { | ||
fatalError() | ||
|
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_brace
)