From acebc936d76aa494c39fc73a20272156a0c9f166 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Wed, 2 Dec 2020 12:50:42 -0500 Subject: [PATCH] simplifying. --- .../ModelProtocols/MoleculeModelProtocol.swift | 12 +++--------- .../FormUIHelpers/Rules/Rules/RulesProtocol.swift | 8 ++------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/MVMCoreUI/Atomic/Protocols/ModelProtocols/MoleculeModelProtocol.swift b/MVMCoreUI/Atomic/Protocols/ModelProtocols/MoleculeModelProtocol.swift index 1fdc22ad..e554581d 100644 --- a/MVMCoreUI/Atomic/Protocols/ModelProtocols/MoleculeModelProtocol.swift +++ b/MVMCoreUI/Atomic/Protocols/ModelProtocols/MoleculeModelProtocol.swift @@ -15,20 +15,14 @@ public protocol MoleculeModelProtocol: ModelProtocol { public extension MoleculeModelProtocol { - var moleculeName: String { - get { Self.identifier } - } + var moleculeName: String { Self.identifier } var accessibilityIdentifier: String? { get { nil } set { } } - static var categoryName: String { - "\(MoleculeModelProtocol.self)" - } + static var categoryName: String { "\(MoleculeModelProtocol.self)" } - static var categoryCodingKey: String { - "moleculeName" - } + static var categoryCodingKey: String { "moleculeName" } } diff --git a/MVMCoreUI/FormUIHelpers/Rules/Rules/RulesProtocol.swift b/MVMCoreUI/FormUIHelpers/Rules/Rules/RulesProtocol.swift index 04259dbc..5a8b47a8 100644 --- a/MVMCoreUI/FormUIHelpers/Rules/Rules/RulesProtocol.swift +++ b/MVMCoreUI/FormUIHelpers/Rules/Rules/RulesProtocol.swift @@ -31,15 +31,11 @@ public protocol RulesProtocol: ModelProtocol { public extension RulesProtocol { - var type: String { - get { Self.identifier } - } + var type: String { Self.identifier } static var categoryCodingKey: String { "type" } - static var categoryName: String { - "\(RulesProtocol.self)" - } + static var categoryName: String { "\(RulesProtocol.self)" } // Individual rule can override the function to validate based on the rule type. func validate(_ fieldMolecules: [String: FormFieldProtocol]) -> Bool {