Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 1b4d284

Browse files
committed
Remove unused StatsEmailOpensData
1 parent c78d1f2 commit 1b4d284

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Sources/WordPressKit/Models/Stats/Emails/StatsEmailOpensData.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ public struct StatsEmailOpensData: Decodable, Equatable {
1919
case totalOpens = "total_opens"
2020
case opensRate = "opens_rate"
2121
}
22-
23-
public init(from decoder: any Decoder) throws {
24-
let container = try decoder.container(keyedBy: CodingKeys.self)
25-
totalSends = try container.decodeIfPresent(Int.self, forKey: .totalSends)
26-
uniqueOpens = try container.decodeIfPresent(Int.self, forKey: .uniqueOpens)
27-
totalOpens = try container.decodeIfPresent(Int.self, forKey: .totalOpens)
28-
opensRate = try container.decodeIfPresent(Double.self, forKey: .opensRate)
29-
}
3022
}
3123

3224
extension StatsEmailOpensData {

Tests/WordPressKitTests/Tests/StatsRemoteV2Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ class StatsRemoteV2Tests: RemoteTestCase, RESTTestable {
713713

714714
if let data = stats?.data, data.count == 24 {
715715

716-
XCTAssertEqual(data[0].views, 0)
716+
XCTAssertEqual(data[0].views, 5140)
717717
XCTAssertNil(data[0].comments)
718718
XCTAssertEqual(data[1].views, 2)
719719
XCTAssertNil(data[1].comments)

0 commit comments

Comments
 (0)