diff --git a/Sources/PubNub/DependencyContainer/DependencyContainer.swift b/Sources/PubNub/DependencyContainer/DependencyContainer.swift index 82ca1b22..53566bf1 100644 --- a/Sources/PubNub/DependencyContainer/DependencyContainer.swift +++ b/Sources/PubNub/DependencyContainer/DependencyContainer.swift @@ -80,7 +80,7 @@ class DependencyContainer { } preconditionFailure("Cannot create value for key \(key)") } - + func register(key: K.Type, scope: Scope = .container) { registeredKeys[ObjectIdentifier(key)] = (key: key, scope: scope) } @@ -97,7 +97,7 @@ class DependencyContainer { } else { resolvedValues[ObjectIdentifier(key)] = ValueWrapper(value) } - + return self } } @@ -318,11 +318,11 @@ protocol Wrappable { // can only be made to reference types. private class WeakWrapper: Wrappable { private weak var optionalValue: T? - + var value: T? { optionalValue } - + init(_ value: T) { self.optionalValue = value } @@ -331,7 +331,7 @@ private class WeakWrapper: Wrappable { // Holds a strong reference to the object it wraps private class ValueWrapper: Wrappable { let value: T? - + init(_ value: T) { self.value = value }