From 5d128c9aa1104e3ee6e2b7d400ed2078c61bcffd Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Mon, 21 Feb 2022 19:25:25 -0800 Subject: [PATCH] Code style --- .../Operations/EarthquakeOperation.swift | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Earthquakes/Operations/EarthquakeOperation.swift b/Earthquakes/Operations/EarthquakeOperation.swift index 1b5cd3e..ef82c15 100644 --- a/Earthquakes/Operations/EarthquakeOperation.swift +++ b/Earthquakes/Operations/EarthquakeOperation.swift @@ -127,29 +127,29 @@ class EarthquakeOperation: Operation { override var isReady: Bool { switch state { - case .Initialized: - // If the operation has been cancelled, "isReady" should return true + case .Initialized: + // If the operation has been cancelled, "isReady" should return true return isCancelled - case .Pending: - // If the operation has been cancelled, "isReady" should return true + case .Pending: + // If the operation has been cancelled, "isReady" should return true guard !isCancelled else { - return true - } + return true + } - // If super isReady, conditions can be evaluated + // If super isReady, conditions can be evaluated if super.isReady { - evaluateConditions() - } + evaluateConditions() + } - // Until conditions have been evaluated, "isReady" returns false - return false + // Until conditions have been evaluated, "isReady" returns false + return false - case .Ready: + case .Ready: return super.isReady || isCancelled - default: - return false + default: + return false } }