From 7af6a20cd9199af9c67ae30499c09b6c63fe7118 Mon Sep 17 00:00:00 2001 From: AKosylo Date: Fri, 13 Oct 2023 08:42:21 +0200 Subject: [PATCH] swiftlint: fix --- DXFeedFramework/Events/Market/AnalyticOrder.swift | 2 -- DXFeedFramework/Events/Market/Extra/IcebergType.swift | 1 - DXFeedFramework/Events/Market/Extra/OrderSource.swift | 3 +-- DXFeedFramework/Events/Market/Extra/Scope.swift | 1 - DXFeedFramework/Events/Market/Series.swift | 2 +- .../Native/Events/Markets/SpreadOrderMapper.swift | 2 +- DXFeedFrameworkTests/OrderSourceTest.swift | 9 ++++----- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/DXFeedFramework/Events/Market/AnalyticOrder.swift b/DXFeedFramework/Events/Market/AnalyticOrder.swift index ff5b08503..979e82abd 100644 --- a/DXFeedFramework/Events/Market/AnalyticOrder.swift +++ b/DXFeedFramework/Events/Market/AnalyticOrder.swift @@ -71,5 +71,3 @@ extension AnalyticOrder { } } } - - diff --git a/DXFeedFramework/Events/Market/Extra/IcebergType.swift b/DXFeedFramework/Events/Market/Extra/IcebergType.swift index 9e0b12479..4c820928a 100644 --- a/DXFeedFramework/Events/Market/Extra/IcebergType.swift +++ b/DXFeedFramework/Events/Market/Extra/IcebergType.swift @@ -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 diff --git a/DXFeedFramework/Events/Market/Extra/OrderSource.swift b/DXFeedFramework/Events/Market/Extra/OrderSource.swift index f7fea44fa..491d86342 100644 --- a/DXFeedFramework/Events/Market/Extra/OrderSource.swift +++ b/DXFeedFramework/Events/Market/Extra/OrderSource.swift @@ -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 { diff --git a/DXFeedFramework/Events/Market/Extra/Scope.swift b/DXFeedFramework/Events/Market/Extra/Scope.swift index 8becbec2f..af730fdf2 100644 --- a/DXFeedFramework/Events/Market/Extra/Scope.swift +++ b/DXFeedFramework/Events/Market/Extra/Scope.swift @@ -23,7 +23,6 @@ public enum Scope: Int, CaseIterable { case order } - /// Class extension for ``ScopeExt`` enum. public class ScopeExt { private static let values: [Scope] = diff --git a/DXFeedFramework/Events/Market/Series.swift b/DXFeedFramework/Events/Market/Series.swift index ba0eb7fc9..be49bfedd 100644 --- a/DXFeedFramework/Events/Market/Series.swift +++ b/DXFeedFramework/Events/Market/Series.swift @@ -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. diff --git a/DXFeedFramework/Native/Events/Markets/SpreadOrderMapper.swift b/DXFeedFramework/Native/Events/Markets/SpreadOrderMapper.swift index abb744777..9beaa91e0 100644 --- a/DXFeedFramework/Native/Events/Markets/SpreadOrderMapper.swift +++ b/DXFeedFramework/Native/Events/Markets/SpreadOrderMapper.swift @@ -14,7 +14,7 @@ class SpreadOrderMapper: Mapper { func fromNative(native: UnsafeMutablePointer) -> MarketEvent? { let event = native.withMemoryRebound(to: type, capacity: 1) { native in return SpreadOrder(native: native.pointee) - } + } return event } diff --git a/DXFeedFrameworkTests/OrderSourceTest.swift b/DXFeedFrameworkTests/OrderSourceTest.swift index f2954c495..13dfccc83 100644 --- a/DXFeedFrameworkTests/OrderSourceTest.swift +++ b/DXFeedFrameworkTests/OrderSourceTest.swift @@ -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 @@ -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 @@ -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)