Skip to content

Commit bc46f8d

Browse files
committed
refactor: Sonar Cloud
1 parent 1fc92db commit bc46f8d

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

MailCore/Models/AddressBook.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ public final class AddressBook: Object, Codable, Identifiable {
4949

5050
public init(from decoder: any Decoder) throws {
5151
let container = try decoder.container(keyedBy: CodingKeys.self)
52-
let id = try container.decode(Int.self, forKey: .id)
53-
let uuid = try container.decode(String.self, forKey: .uuid)
54-
let name = try container.decode(String.self, forKey: .name)
55-
let isDefault = try container.decode(Bool.self, forKey: .isDefault)
56-
let groupContact = try container.decode(List<GroupContact>.self, forKey: .groupContact)
57-
let organization = try container.decode(String.self, forKey: .organization)
58-
let isDynamicOrganisation = try container.decode(Bool.self, forKey: .isDynamicOrganisation)
52+
let _id = try container.decode(Int.self, forKey: .id)
53+
let _uuid = try container.decode(String.self, forKey: .uuid)
54+
let _name = try container.decode(String.self, forKey: .name)
55+
let _isDefault = try container.decode(Bool.self, forKey: .isDefault)
56+
let _groupContact = try container.decode(List<GroupContact>.self, forKey: .groupContact)
57+
let _organization = try container.decode(String.self, forKey: .organization)
58+
let _isDynamicOrganisation = try container.decode(Bool.self, forKey: .isDynamicOrganisation)
5959

6060
super.init()
6161

62-
self.id = id
63-
self.name = isDynamicOrganisation ? organization : name
64-
self.uuid = uuid
65-
self.isDefault = isDefault
66-
self.groupContact = groupContact
62+
self.id = _id
63+
self.name = _isDynamicOrganisation ? _organization : _name
64+
self.uuid = _uuid
65+
self.isDefault = _isDefault
66+
self.groupContact = _groupContact
6767
}
6868
}
6969

0 commit comments

Comments
 (0)