Skip to content

Commit

Permalink
🚨 Fix some SwiftLint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
iujames committed Oct 27, 2022
1 parent 267fb44 commit 29abdf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/AppcuesKit/Data/Analytics/AnalyticsTracker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ internal class AnalyticsTracker: AnalyticsTracking, AnalyticsSubscribing {
if let experienceRenderer = container?.resolve(ExperienceRendering.self) {
let experiments = qualifyResponse.experiments ?? []
let qualifiedExperienceData: [ExperienceData] = qualifyResponse.experiences.map { experience in
var experiment = experiments.first { $0.experienceID == experience.id }
let experiment = experiments.first { $0.experienceID == experience.id }
return ExperienceData(experience,
priority: qualifyResponse.renderPriority,
published: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ internal class AppcuesStepInteractionAction: ExperienceAction {

if let experienceData = experienceRenderer.getCurrentExperienceData(),
let stepIndex = experienceRenderer.getCurrentStepIndex() {
interactionProperties = interactionProperties.merging(LifecycleEvent.properties(experienceData, stepIndex)) { first, _ in first }
interactionProperties = interactionProperties
.merging(LifecycleEvent.properties(experienceData, stepIndex)) { first, _ in first }
}

analyticsPublisher.publish(TrackingUpdate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ internal enum LifecycleEvent: String, CaseIterable {

/// Map experience model to a general property dictionary.
@available(iOS 13.0, *)
static func properties(_ experience: ExperienceData, _ stepIndex: Experience.StepIndex? = nil, error: ErrorBody? = nil) -> [String: Any] {
static func properties(_ experience: ExperienceData,
_ stepIndex: Experience.StepIndex? = nil,
error: ErrorBody? = nil) -> [String: Any] {
var properties: [String: Any] = [
"experienceId": experience.id.uuidString.lowercased(),
"experienceName": experience.name,
Expand Down

0 comments on commit 29abdf2

Please sign in to comment.