Skip to content

Commit

Permalink
Codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Mar 25, 2024
1 parent f054c8f commit bd6be5f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/PubNub/DependencyContainer/DependencyContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class DependencyContainer {
}
preconditionFailure("Cannot create value for key \(key)")
}

func register<K: DependencyKey>(key: K.Type, scope: Scope = .container) {
registeredKeys[ObjectIdentifier(key)] = (key: key, scope: scope)
}
Expand All @@ -97,7 +97,7 @@ class DependencyContainer {
} else {
resolvedValues[ObjectIdentifier(key)] = ValueWrapper(value)
}

return self
}
}
Expand Down Expand Up @@ -318,11 +318,11 @@ protocol Wrappable<T> {
// can only be made to reference types.
private class WeakWrapper<T: AnyObject>: Wrappable {
private weak var optionalValue: T?

var value: T? {
optionalValue
}

init(_ value: T) {
self.optionalValue = value
}
Expand All @@ -331,7 +331,7 @@ private class WeakWrapper<T: AnyObject>: Wrappable {
// Holds a strong reference to the object it wraps
private class ValueWrapper<T>: Wrappable {
let value: T?

init(_ value: T) {
self.value = value
}
Expand Down

0 comments on commit bd6be5f

Please sign in to comment.