Skip to content

Commit 28d5cfe

Browse files
authored
Explicit Returns (#132)
1 parent 7c91c32 commit 28d5cfe

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

Sources/OAuthKit/Extensions/Collection+Extensions.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Collection+Extensions.swift
33
//
44
//
5-
// Created by Kevin McKee on 5/29/24.
5+
// Created by Kevin McKee
66
//
77

88
import Foundation
@@ -11,7 +11,5 @@ extension Collection {
1111

1212
/// Returns true if the collection is not empty.
1313
@inlinable
14-
public var isNotEmpty: Bool {
15-
!isEmpty
16-
}
14+
public var isNotEmpty: Bool { !isEmpty }
1715
}

Sources/OAuthKit/Extensions/Date+Extensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Date+Extensions.swift
33
//
44
//
5-
// Created by Kevin McKee on 5/30/24.
5+
// Created by Kevin McKee
66
//
77

88
import Foundation
@@ -15,6 +15,6 @@ public extension Date {
1515
/// - rhs: the right hand date
1616
/// - Returns: the time interval between the two dates.
1717
static func - (lhs: Date, rhs: Date) -> TimeInterval {
18-
return lhs.timeIntervalSinceReferenceDate - rhs.timeIntervalSinceReferenceDate
18+
lhs.timeIntervalSinceReferenceDate - rhs.timeIntervalSinceReferenceDate
1919
}
2020
}

Sources/OAuthKit/Extensions/String+Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010

1111
extension String {
1212

13-
/// Denotes an empty string.
13+
/// Denotes an empty string literal.
1414
static let empty = ""
1515

1616
/// Returns the SHA-256 Digest for this string instance

Sources/OAuthKit/OAuth+Authorization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension OAuth {
1919
/// The issued access token.
2020
public let token: Token
2121

22-
/// Initializer
22+
/// Creates an authorization that can be stored inside the keychain.
2323
/// - Parameters:
2424
/// - issuer: the provider ID that issued the authorization.
2525
/// - token: the access token

Sources/OAuthKit/OAuth+GrantType.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ extension OAuth {
4040
public var rawValue: String {
4141
switch self {
4242
case .authorizationCode:
43-
return "authorization_code"
43+
"authorization_code"
4444
case .clientCredentials:
45-
return "client_credentials"
45+
"client_credentials"
4646
case .deviceCode:
47-
return "device_code"
47+
"device_code"
4848
case .pkce:
49-
return "pkce"
49+
"pkce"
5050
case .refreshToken:
51-
return "refresh_token"
51+
"refresh_token"
5252
}
5353
}
5454
}

0 commit comments

Comments
 (0)