Skip to content

Commit

Permalink
Run swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrandonw authored and actions-user committed May 20, 2020
1 parent 82d2a23 commit ad6a173
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Sources/ComposableCoreLocation/Interface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public struct LocationManager {
)
)
}

@available(tvOS, unavailable)
@available(watchOS, unavailable)
public func startMonitoringForRegion(id: AnyHashable, region: Region) -> Effect<Never, Never> {
Expand Down
2 changes: 1 addition & 1 deletion Sources/ComposableCoreLocation/Live.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ extension LocationManager {
#endif
}
}

#if os(iOS) || targetEnvironment(macCatalyst)
manager.startMonitoringVisits = { id in
.fireAndForget { dependencies[id]?.locationManager.startMonitoringVisits() }
Expand Down
112 changes: 83 additions & 29 deletions Sources/ComposableCoreLocation/Mock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@
@available(tvOS, unavailable)
@available(watchOS, unavailable)
public static func mock(
authorizationStatus: @escaping () -> CLAuthorizationStatus = { _unimplemented("authorizationStatus") },
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in _unimplemented("create") },
authorizationStatus: @escaping () -> CLAuthorizationStatus = {
_unimplemented("authorizationStatus")
},
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in
_unimplemented("create")
},
destroy: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("destroy") },
dismissHeadingCalibrationDisplay: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("dismissHeadingCalibrationDisplay")
Expand All @@ -57,38 +61,54 @@
maximumRegionMonitoringDistance: @escaping (AnyHashable) -> CLLocationDistance = { _ in
_unimplemented("maximumRegionMonitoringDistance")
},
monitoredRegions: @escaping (AnyHashable) -> Set<Region> = { _ in _unimplemented("monitoredRegions") },
monitoredRegions: @escaping (AnyHashable) -> Set<Region> = { _ in
_unimplemented("monitoredRegions")
},
requestAlwaysAuthorization: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestAlwaysAuthorization")
},
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("requestLocation") },
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestLocation")
},
requestWhenInUseAuthorization: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestWhenInUseAuthorization")
},
set: @escaping (_ id: AnyHashable, _ properties: Properties) -> Effect<Never, Never> = {
_, _ in _unimplemented("set")
},
significantLocationChangeMonitoringAvailable: @escaping () -> Bool = { _unimplemented("significantLocationChangeMonitoringAvailable") },
significantLocationChangeMonitoringAvailable: @escaping () -> Bool = {
_unimplemented("significantLocationChangeMonitoringAvailable")
},
startMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> Effect<Never, Never> = {
_ in _unimplemented("startMonitoringSignificantLocationChanges")
},
startMonitoringForRegion: @escaping (AnyHashable, Region) -> Effect<Never, Never> = { _, _ in
_unimplemented("startMonitoringForRegion")
},
startMonitoringVisits: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("startMonitoringVisits")
startMonitoringVisits: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("startMonitoringVisits")
},
startUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("startUpdatingLocation")
startUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("startUpdatingLocation")
},
stopMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> Effect<Never, Never> = {
_ in _unimplemented("stopMonitoringSignificantLocationChanges")
},
stopMonitoringForRegion: @escaping (AnyHashable, Region) -> Effect<Never, Never> = { _, _ in
_unimplemented("stopMonitoringForRegion")
},
stopMonitoringVisits: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("stopMonitoringVisits") },
startUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("startUpdatingHeading") },
stopUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("stopUpdatingHeading") },
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("stopUpdatingLocation") }
stopMonitoringVisits: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("stopMonitoringVisits")
},
startUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("startUpdatingHeading")
},
stopUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("stopUpdatingHeading")
},
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("stopUpdatingLocation")
}
) -> Self {
Self(
authorizationStatus: authorizationStatus,
Expand Down Expand Up @@ -125,8 +145,12 @@
@available(macOS, unavailable)
@available(tvOS, unavailable)
public static func mock(
authorizationStatus: @escaping () -> CLAuthorizationStatus = { _unimplemented("authorizationStatus") },
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in _unimplemented("create") },
authorizationStatus: @escaping () -> CLAuthorizationStatus = {
_unimplemented("authorizationStatus")
},
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in
_unimplemented("create")
},
destroy: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("destroy") },
dismissHeadingCalibrationDisplay: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("dismissHeadingCalibrationDisplay")
Expand All @@ -138,18 +162,27 @@
requestAlwaysAuthorization: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestAlwaysAuthorization")
},
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("requestLocation") },
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestLocation")
},
requestWhenInUseAuthorization: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestWhenInUseAuthorization")
},
set: @escaping (_ id: AnyHashable, _ properties: Properties) -> Effect<Never, Never> = {
_, _ in _unimplemented("set")
},
startUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("startUpdatingHeading") },
startUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("startUpdatingLocation")
startUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("startUpdatingHeading")
},
stopUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("stopUpdatingHeading") },
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("stopUpdatingLocation") }
startUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("startUpdatingLocation")
},
stopUpdatingHeading: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("stopUpdatingHeading")
},
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("stopUpdatingLocation")
}
) -> Self {
Self(
authorizationStatus: authorizationStatus,
Expand All @@ -176,19 +209,27 @@
@available(macOS, unavailable)
@available(watchOS, unavailable)
public static func mock(
authorizationStatus: @escaping () -> CLAuthorizationStatus = { _unimplemented("authorizationStatus") },
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in _unimplemented("create") },
authorizationStatus: @escaping () -> CLAuthorizationStatus = {
_unimplemented("authorizationStatus")
},
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in
_unimplemented("create")
},
destroy: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("destroy") },
location: @escaping (AnyHashable) -> Location = { _ in _unimplemented("location") },
locationServicesEnabled: @escaping () -> Bool = { _unimplemented("locationServicesEnabled") },
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("requestLocation") },
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestLocation")
},
requestWhenInUseAuthorization: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestWhenInUseAuthorization")
},
set: @escaping (_ id: AnyHashable, _ properties: Properties) -> Effect<Never, Never> = {
_, _ in _unimplemented("set")
},
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("stopUpdatingLocation") }
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("stopUpdatingLocation")
}
) -> Self {
Self(
authorizationStatus: authorizationStatus,
Expand All @@ -208,39 +249,52 @@
@available(tvOS, unavailable)
@available(watchOS, unavailable)
public static func mock(
authorizationStatus: @escaping () -> CLAuthorizationStatus = { _unimplemented("authorizationStatus") },
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in _unimplemented("create") },
authorizationStatus: @escaping () -> CLAuthorizationStatus = {
_unimplemented("authorizationStatus")
},
create: @escaping (_ id: AnyHashable) -> Effect<Action, Never> = { _ in
_unimplemented("create")
},
destroy: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("destroy") },
headingAvailable: @escaping () -> Bool = { _unimplemented("headingAvailable") },
location: @escaping (AnyHashable) -> Location = { _ in _unimplemented("location") },
locationServicesEnabled: @escaping () -> Bool = { _unimplemented("locationServicesEnabled") },
maximumRegionMonitoringDistance: @escaping (AnyHashable) -> CLLocationDistance = { _ in
_unimplemented("maximumRegionMonitoringDistance")
},
monitoredRegions: @escaping (AnyHashable) -> Set<Region> = { _ in _unimplemented("monitoredRegions") },
monitoredRegions: @escaping (AnyHashable) -> Set<Region> = { _ in
_unimplemented("monitoredRegions")
},
requestAlwaysAuthorization: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestAlwaysAuthorization")
},
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("requestLocation") },
requestLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("requestLocation")
},
set: @escaping (_ id: AnyHashable, _ properties: Properties) -> Effect<Never, Never> = {
_, _ in _unimplemented("set")
},
significantLocationChangeMonitoringAvailable: @escaping () -> Bool = { _unimplemented("significantLocationChangeMonitoringAvailable") },
significantLocationChangeMonitoringAvailable: @escaping () -> Bool = {
_unimplemented("significantLocationChangeMonitoringAvailable")
},
startMonitoringForRegion: @escaping (AnyHashable, Region) -> Effect<Never, Never> = { _, _ in
_unimplemented("startMonitoringForRegion")
},
startMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> Effect<Never, Never> = {
_ in _unimplemented("startMonitoringSignificantLocationChanges")
},
startUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("startUpdatingLocation")
startUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("startUpdatingLocation")
},
stopMonitoringForRegion: @escaping (AnyHashable, Region) -> Effect<Never, Never> = { _, _ in
_unimplemented("stopMonitoringForRegion")
},
stopMonitoringSignificantLocationChanges: @escaping (AnyHashable) -> Effect<Never, Never> = {
_ in _unimplemented("stopMonitoringSignificantLocationChanges")
},
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in _unimplemented("stopUpdatingLocation") }
stopUpdatingLocation: @escaping (AnyHashable) -> Effect<Never, Never> = { _ in
_unimplemented("stopUpdatingLocation")
}
) -> Self {
Self(
authorizationStatus: authorizationStatus,
Expand Down

0 comments on commit ad6a173

Please sign in to comment.