Skip to content

Commit e913521

Browse files
davdromangithub-actions[bot]
authored andcommitted
Run SwiftFormat
1 parent 61021b6 commit e913521

15 files changed

+41
-41
lines changed

Demo/Demo/Pages.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ struct PageLink: View {
130130
.fill(Color.blue.opacity(0.8))
131131
#endif
132132
Text(title)
133-
#if !os(tvOS)
133+
#if !os(tvOS)
134134
.foregroundColor(.white)
135-
#endif
135+
#endif
136136
.font(.system(size: 18, weight: .medium, design: .rounded))
137137
}
138138
.frame(maxHeight: 50)
@@ -162,14 +162,14 @@ struct Code<Content: StringProtocol>: View {
162162
.font(.system(size: 14, design: .monospaced))
163163
.background(shape.stroke(Color(white: 0.1).opacity(0.35), lineWidth: 1))
164164
.background(Color(white: 0.94).opacity(0.6).clipShape(shape))
165-
#if !os(tvOS)
165+
#if !os(tvOS)
166166
.do {
167167
if #available(iOS 15, *) {
168168
$0.textSelection(.enabled)
169169
} else {
170170
$0
171171
}
172172
}
173-
#endif
173+
#endif
174174
}
175175
}

Sources/Animation/Animation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import UIKit
33
public struct Animation {
44
static var defaultDuration: Double { 0.35 }
55

6-
@_spi(package)public var duration: Double
7-
@_spi(package)public let timingParameters: UITimingCurveProvider
6+
@_spi(package) public var duration: Double
7+
@_spi(package) public let timingParameters: UITimingCurveProvider
88

99
init(duration: Double, timingParameters: UITimingCurveProvider) {
1010
self.duration = duration

Sources/Animator/AnimatorTransientView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ public class AnimatorTransientView {
3232
/// Note: these changes are *not* animated.
3333
public var completion: Properties
3434

35-
@_spi(package)public let uiView: UIView
35+
@_spi(package) public let uiView: UIView
3636

3737
/// Read-only proxy to underlying `UIView` properties.
3838
public subscript<T>(dynamicMember keyPath: KeyPath<UIView, T>) -> T {
3939
uiView[keyPath: keyPath]
4040
}
4141

42-
@_spi(package)public init(_ uiView: UIView) {
42+
@_spi(package) public init(_ uiView: UIView) {
4343
self.initial = Properties(of: uiView)
4444
self.animation = Properties(of: uiView)
4545
self.completion = Properties(of: uiView)
4646

4747
self.uiView = uiView
4848
}
4949

50-
@_spi(package)public func setUIViewProperties(to properties: KeyPath<AnimatorTransientView, Properties>) {
50+
@_spi(package) public func setUIViewProperties(to properties: KeyPath<AnimatorTransientView, Properties>) {
5151
self[keyPath: properties].assignToUIView(uiView)
5252
}
5353
}

Sources/AtomicTransition/AtomicTransitionBuilder.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
@resultBuilder
2-
public struct AtomicTransitionBuilder {
2+
public enum AtomicTransitionBuilder {
33
public static func buildBlock() -> Identity {
44
Identity()
55
}
6+
67
#if compiler(>=5.7)
78
public static func buildPartialBlock<T1: AtomicTransition>(first: T1) -> T1 {
89
first

Sources/AtomicTransition/Rotate3D.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public struct Rotate3D: MirrorableAtomicTransition {
3636

3737
extension Rotate3D: Hashable {
3838
public static func == (lhs: Rotate3D, rhs: Rotate3D) -> Bool {
39-
return lhs.angle == rhs.angle
39+
lhs.angle == rhs.angle
4040
&& lhs.axis == rhs.axis
4141
}
4242

Sources/NavigationTransition/AnyNavigationTransition.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@ import Animation
22
import UIKit
33

44
public struct AnyNavigationTransition {
5-
@_spi(package)public typealias TransientHandler = (
5+
@_spi(package) public typealias TransientHandler = (
66
AnimatorTransientView,
77
AnimatorTransientView,
88
NavigationTransitionOperation,
99
UIView
1010
) -> Void
1111

12-
@_spi(package)public typealias PrimitiveHandler = (
12+
@_spi(package) public typealias PrimitiveHandler = (
1313
Animator,
1414
NavigationTransitionOperation,
1515
UIViewControllerContextTransitioning
1616
) -> Void
1717

18-
@_spi(package)public enum Handler {
18+
@_spi(package) public enum Handler {
1919
case transient(TransientHandler)
2020
case primitive(PrimitiveHandler)
2121
}
2222

23-
@_spi(package)public let isDefault: Bool
24-
@_spi(package)public let handler: Handler
25-
@_spi(package)public var animation: Animation? = .default
23+
@_spi(package) public let isDefault: Bool
24+
@_spi(package) public let handler: Handler
25+
@_spi(package) public var animation: Animation? = .default
2626

2727
public init<T: NavigationTransition>(_ transition: T) {
2828
self.isDefault = false

Sources/NavigationTransition/Default.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extension AnyNavigationTransition {
1717
}
1818
}
1919

20-
@_spi(package)public struct Default: PrimitiveNavigationTransition {
20+
@_spi(package) public struct Default: PrimitiveNavigationTransition {
2121
init() {}
2222

2323
public func transition(with animator: Animator, for operation: TransitionOperation, in context: Context) {

Sources/NavigationTransition/NavigationTransition.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public enum NavigationTransitionOperation: Hashable {
8686
case push
8787
case pop
8888

89-
@_spi(package)public init?(_ operation: UINavigationController.Operation) {
89+
@_spi(package) public init?(_ operation: UINavigationController.Operation) {
9090
switch operation {
9191
case .push:
9292
self = .push

Sources/NavigationTransition/NavigationTransitionBuilder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@resultBuilder
2-
public struct NavigationTransitionBuilder {
2+
public enum NavigationTransitionBuilder {
33
#if compiler(>=5.7)
44
public static func buildPartialBlock<T1: NavigationTransition>(first: T1) -> T1 {
55
first
@@ -119,7 +119,7 @@ public struct NavigationTransitionBuilder {
119119
public static func buildEither<TrueTransition: NavigationTransition, FalseTransition: NavigationTransition>(first component: TrueTransition) -> _ConditionalTransition<TrueTransition, FalseTransition> {
120120
_ConditionalTransition(trueTransition: component)
121121
}
122-
122+
123123
public static func buildEither<TrueTransition: NavigationTransition, FalseTransition: NavigationTransition>(second component: FalseTransition) -> _ConditionalTransition<TrueTransition, FalseTransition> {
124124
_ConditionalTransition(falseTransition: component)
125125
}

Sources/NavigationTransitions/NavigationTransition+UIKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ extension UINavigationController {
223223
}
224224

225225
extension UINavigationController {
226-
@objc fileprivate func popToViewController_forceAnimated(_ viewController: UIViewController, animated: Bool) -> [UIViewController]? {
226+
@objc private func popToViewController_forceAnimated(_ viewController: UIViewController, animated: Bool) -> [UIViewController]? {
227227
popToViewController_forceAnimated(viewController, animated: true)
228228
}
229229
}

Sources/RuntimeSwizzling/Swizzle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public func swizzle(_ type: AnyObject.Type, _ original: Selector, _ swizzled: Se
2626
method_exchangeImplementations(originalMethod, swizzledMethod)
2727
}
2828

29-
fileprivate struct SwizzlingHistory {
29+
private struct SwizzlingHistory {
3030
private var map: [Int: Void] = [:]
3131

3232
func contains(_ type: AnyObject.Type, _ original: Selector, _ swizzled: Selector) -> Bool {
@@ -46,4 +46,4 @@ fileprivate struct SwizzlingHistory {
4646
}
4747
}
4848

49-
fileprivate var swizzlingHistory = SwizzlingHistory()
49+
private var swizzlingHistory = SwizzlingHistory()

Sources/TestUtils/AnimatorTransientView+Mocks.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ extension AnimatorTransientView {
99
}
1010

1111
final class UnimplementedAnimatorTransientView: AnimatorTransientView {
12-
public override var initial: AnimatorTransientView.Properties {
12+
override public var initial: AnimatorTransientView.Properties {
1313
get {
1414
XCTFail("\(Self.self).\(#function) is unimplemented")
1515
return .noop
@@ -19,7 +19,7 @@ final class UnimplementedAnimatorTransientView: AnimatorTransientView {
1919
}
2020
}
2121

22-
public override var animation: AnimatorTransientView.Properties {
22+
override public var animation: AnimatorTransientView.Properties {
2323
get {
2424
XCTFail("\(Self.self).\(#function) is unimplemented")
2525
return .noop
@@ -29,7 +29,7 @@ final class UnimplementedAnimatorTransientView: AnimatorTransientView {
2929
}
3030
}
3131

32-
public override var completion: AnimatorTransientView.Properties {
32+
override public var completion: AnimatorTransientView.Properties {
3333
get {
3434
XCTFail("\(Self.self).\(#function) is unimplemented")
3535
return .noop
@@ -39,7 +39,7 @@ final class UnimplementedAnimatorTransientView: AnimatorTransientView {
3939
}
4040
}
4141

42-
public override subscript<T>(dynamicMember keyPath: KeyPath<UIView, T>) -> T {
42+
override public subscript<T>(dynamicMember keyPath: KeyPath<UIView, T>) -> T {
4343
XCTFail("\(Self.self).\(#function) is unimplemented")
4444
return uiView[keyPath: keyPath]
4545
}
@@ -48,13 +48,13 @@ final class UnimplementedAnimatorTransientView: AnimatorTransientView {
4848
super.init(UIView())
4949
}
5050

51-
public override func setUIViewProperties(to properties: KeyPath<AnimatorTransientView, AnimatorTransientView.Properties>) {
51+
override public func setUIViewProperties(to properties: KeyPath<AnimatorTransientView, AnimatorTransientView.Properties>) {
5252
XCTFail("\(Self.self).\(#function) is unimplemented")
5353
}
5454
}
5555

56-
fileprivate extension AnimatorTransientView.Properties {
57-
static let noop = Self(
56+
extension AnimatorTransientView.Properties {
57+
fileprivate static let noop = Self(
5858
alpha: 0,
5959
transform: .init(.init()),
6060
zPosition: 0
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
//@testable import NavigationTransition
1+
// @testable import NavigationTransition
22
//
3-
//extension NavigationTransition {
3+
// extension NavigationTransition {
44
// public static func spy(_ handler: @escaping () -> Void) -> Self {
55
// .init { _, _, _ in
66
// handler()
@@ -10,16 +10,16 @@
1010
// public static func spy(_ handler: @escaping _Handler) -> Self {
1111
// .init(handler: handler)
1212
// }
13-
//}
13+
// }
1414
//
15-
//extension NavigationTransition {
15+
// extension NavigationTransition {
1616
// public static var noop: Self {
1717
// .init { _, _, _ in }
1818
// }
19-
//}
19+
// }
2020
//
21-
//extension NavigationTransition.Operation {
21+
// extension NavigationTransition.Operation {
2222
// public static func random() -> Self {
2323
// [.push, .pop].randomElement()!
2424
// }
25-
//}
25+
// }

Sources/TestUtils/UIKitContext+Mocks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public final class MockedUIKitContext: UnimplementedUIKitContext {
7979
}
8080

8181
private var _containerView: UIView
82-
public override var containerView: UIView {
82+
override public var containerView: UIView {
8383
_containerView
8484
}
8585
}

Tests/AnimatorTests/AnimatorTransientViewPropertiesTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
@_spi(package) @testable import Animator
22
import TestUtils
33

4-
final class AnimatorTransientViewPropertiesTests: XCTestCase {
5-
}
4+
final class AnimatorTransientViewPropertiesTests: XCTestCase {}
65

76
extension AnimatorTransientViewPropertiesTests {
87
func testAssignToUIView() {

0 commit comments

Comments
 (0)