Skip to content

Commit 3a37130

Browse files
committed
Fix
1 parent d54592b commit 3a37130

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

splitio_ios/ios/Classes/SplitWrapper.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ protocol EvaluationWrapper {
3232

3333
func getTreatmentsWithConfig(matchingKey: String, splits: [String], bucketingKey: String?, attributes: [String: Any]?) -> [String: SplitResult]
3434

35-
func getTreatmentsByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String?, attributes: [String: Any]?) -> [String: String]?
35+
func getTreatmentsByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String?, attributes: [String: Any]?) -> [String: String]
3636

37-
func getTreatmentsByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String?, attributes: [String: Any]?) -> [String: String]?
37+
func getTreatmentsByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String?, attributes: [String: Any]?) -> [String: String]
3838

39-
func getTreatmentsWithConfigByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String?, attributes: [String: Any]?) -> [String: SplitResult]?
39+
func getTreatmentsWithConfigByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String?, attributes: [String: Any]?) -> [String: SplitResult]
4040

41-
func getTreatmentsWithConfigByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String?, attributes: [String: Any]?) -> [String: SplitResult]?
41+
func getTreatmentsWithConfigByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String?, attributes: [String: Any]?) -> [String: SplitResult]
4242
}
4343

4444
protocol AttributesWrapper {
@@ -129,33 +129,33 @@ class DefaultSplitWrapper: SplitWrapper {
129129
return client.getTreatmentsWithConfig(splits: splits, attributes: attributes)
130130
}
131131

132-
func getTreatmentsByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: String]? {
132+
func getTreatmentsByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: String] {
133133
guard let client = getInitializedClient(matchingKey: matchingKey, bucketingKey: bucketingKey) else {
134-
return nil
134+
return [:]
135135
}
136136

137137
return client.getTreatmentsByFlagSet(flagSet, attributes: attributes)
138138
}
139139

140-
func getTreatmentsByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: String]? {
140+
func getTreatmentsByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: String] {
141141
guard let client = getInitializedClient(matchingKey: matchingKey, bucketingKey: bucketingKey) else {
142-
return nil
142+
return [:]
143143
}
144144

145145
return client.getTreatmentsByFlagSets(flagSets, attributes: attributes)
146146
}
147147

148-
func getTreatmentsWithConfigByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: SplitResult]? {
148+
func getTreatmentsWithConfigByFlagSet(matchingKey: String, flagSet: String, bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: SplitResult] {
149149
guard let client = getInitializedClient(matchingKey: matchingKey, bucketingKey: bucketingKey) else {
150-
return nil
150+
return [:]
151151
}
152152

153153
return client.getTreatmentsWithConfigByFlagSet(flagSet, attributes: attributes)
154154
}
155155

156-
func getTreatmentsWithConfigByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: SplitResult]? {
156+
func getTreatmentsWithConfigByFlagSets(matchingKey: String, flagSets: [String], bucketingKey: String? = nil, attributes: [String: Any]? = [:]) -> [String: SplitResult] {
157157
guard let client = getInitializedClient(matchingKey: matchingKey, bucketingKey: bucketingKey) else {
158-
return nil
158+
return [:]
159159
}
160160

161161
return client.getTreatmentsWithConfigByFlagSets(flagSets, attributes: attributes)

0 commit comments

Comments
 (0)