Skip to content

Commit

Permalink
swiftlint: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Oct 13, 2023
1 parent f3a673b commit 7af6a20
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
2 changes: 0 additions & 2 deletions DXFeedFramework/Events/Market/AnalyticOrder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,3 @@ extension AnalyticOrder {
}
}
}


1 change: 0 additions & 1 deletion DXFeedFramework/Events/Market/Extra/IcebergType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class IcebergTypeExt {
private static let values: [IcebergType] =
EnumUtil.createEnumBitMaskArrayByValue(defaultValue: .undefined, allCases: IcebergType.allCases)


/// Returns an enum constant of the``IcebergType`` by integer code bit pattern.
/// - Parameters:
/// - value: Property value
Expand Down
3 changes: 1 addition & 2 deletions DXFeedFramework/Events/Market/Extra/OrderSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,10 @@ public class OrderSource: IndexedEventSource {
/// - eventype : Possible values ``Order``, ``AnalyticOrder``, ``SpreadOrder``
/// - Returns: true- events can be directly published with this source
/// - Throws: ``ArgumentException/exception(_:)``
public func isPublishable(eventType: AnyClass.Type) throws -> Bool {
public func isPublishable(eventType: AnyClass.Type) throws -> Bool {
return pubFlags & (try OrderSource.getEventTypeMask(eventType)) != 0
}


/// Returns order source for the specified source identifier.
/// - Throws: ``ArgumentException/exception(_:)``
public static func valueOf(identifier: Int) throws -> OrderSource {
Expand Down
1 change: 0 additions & 1 deletion DXFeedFramework/Events/Market/Extra/Scope.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public enum Scope: Int, CaseIterable {
case order
}


/// Class extension for ``ScopeExt`` enum.
public class ScopeExt {
private static let values: [Scope] =
Expand Down
2 changes: 1 addition & 1 deletion DXFeedFramework/Events/Market/Series.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ extension Series {
if putVolume.isNaN {
return callVolume
}
return callVolume.isNaN ? putVolume : putVolume + putVolume;
return callVolume.isNaN ? putVolume : putVolume + putVolume
}

/// Returns string representation of this candle event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SpreadOrderMapper: Mapper {
func fromNative(native: UnsafeMutablePointer<dxfg_event_type_t>) -> MarketEvent? {
let event = native.withMemoryRebound(to: type, capacity: 1) { native in
return SpreadOrder(native: native.pointee)
}
}
return event
}

Expand Down
9 changes: 4 additions & 5 deletions DXFeedFrameworkTests/OrderSourceTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ final class OrderSourceTest: XCTestCase {

func testCreateOrderSourceWithDuplicateName() throws {
do {
_ = try OrderSource( 44, "COMPOSITE_ASK", 0)
_ = try OrderSource( 33, "COMPOSITE_ASK", 0)
_ = try OrderSource( 44, "COMPOSITE_ASK", 0)
_ = try OrderSource( 33, "COMPOSITE_ASK", 0)
} catch ArgumentException.exception(let message) {
XCTAssert(message.contains("name"), "Wrong message \(message)")
return
Expand All @@ -61,8 +61,8 @@ final class OrderSourceTest: XCTestCase {

func testCreateOrderSourceWithDuplicateId() throws {
do {
_ = try OrderSource(3, "COMPOSITE_ASK1", 0)
_ = try OrderSource(3, "COMPOSITE_ASK3", 0)
_ = try OrderSource(3, "COMPOSITE_ASK1", 0)
_ = try OrderSource(3, "COMPOSITE_ASK3", 0)
} catch ArgumentException.exception(let message) {
XCTAssert(message.contains("id"), "Wrong message \(message)")
return
Expand All @@ -75,7 +75,6 @@ final class OrderSourceTest: XCTestCase {
func testVAlueOf() throws {
do {
let source1 = OrderSource.compsoiteBid

let source = try OrderSource.valueOf(identifier: 1)
} catch {
print(error)
Expand Down

0 comments on commit 7af6a20

Please sign in to comment.