krz/daybyday

iOS app for children to learn days of the week, months, and seasons with audio assist.

clone: git clone https://gitbay.org/krz/daybyday.git

8f0f2b4b4f4b747b5d5fcc5a433f2f4b5109c940

verified · cmc

author: Christian Cleberg <hello@cleberg.net> · 2026-04-14T01:41:49Z

fix: sonarqube quality fixes
 DayByDay.xcodeproj/project.pbxproj |  8 ++++----
 DayByDay/DayCard.swift             |  8 +++++++-
 DayByDay/MonthCard.swift           |  8 +++++++-
 DayByDay/SeasonCard.swift          |  8 +++++++-
 NumberCard.swift                   | 10 ++++++++--
 5 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/DayByDay.xcodeproj/project.pbxproj b/DayByDay.xcodeproj/project.pbxproj
index 874e280..a2d2497 100644
--- a/DayByDay.xcodeproj/project.pbxproj
+++ b/DayByDay.xcodeproj/project.pbxproj
@@ -338,7 +338,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = ZCNAX3VL9D;
 				ENABLE_PREVIEWS = YES;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -353,7 +353,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.3.1;
+				MARKETING_VERSION = 1.3.2;
 				PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.DayByDay;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				STRING_CATALOG_GENERATE_SYMBOLS = YES;
@@ -372,7 +372,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 5;
+				CURRENT_PROJECT_VERSION = 6;
 				DEVELOPMENT_TEAM = ZCNAX3VL9D;
 				ENABLE_PREVIEWS = YES;
 				GENERATE_INFOPLIST_FILE = YES;
@@ -387,7 +387,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.3.1;
+				MARKETING_VERSION = 1.3.2;
 				PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.DayByDay;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				STRING_CATALOG_GENERATE_SYMBOLS = YES;
diff --git a/DayByDay/DayCard.swift b/DayByDay/DayCard.swift
index 4ee3614..1c9d698 100644
--- a/DayByDay/DayCard.swift
+++ b/DayByDay/DayCard.swift
@@ -12,6 +12,12 @@ struct DayCard: View {
     var isHighlighted = false
     @State private var isTapped = false
 
+    private var cardScale: CGFloat {
+        if isTapped { return 1.12 }
+        if isHighlighted { return 1.04 }
+        return 1.0
+    }
+
     var body: some View {
         ZStack {
             RoundedRectangle(cornerRadius: 32, style: .continuous)
@@ -36,7 +42,7 @@ struct DayCard: View {
             }
         }
         .shadow(color: isHighlighted ? .white.opacity(0.8) : .clear, radius: 12)
-        .scaleEffect(isTapped ? 1.12 : (isHighlighted ? 1.04 : 1.0))
+        .scaleEffect(cardScale)
         .contentShape(RoundedRectangle(cornerRadius: 32, style: .continuous))
         .rotation3DEffect(.degrees(isTapped ? 6 : 0), axis: (x: 1, y: 0, z: 0))
         .animation(.spring(response: 0.35, dampingFraction: 0.5), value: isTapped)
diff --git a/DayByDay/MonthCard.swift b/DayByDay/MonthCard.swift
index f462fd4..4b1d6ae 100644
--- a/DayByDay/MonthCard.swift
+++ b/DayByDay/MonthCard.swift
@@ -12,6 +12,12 @@ struct MonthCard: View {
     var isHighlighted = false
     @State private var isTapped = false
 
+    private var cardScale: CGFloat {
+        if isTapped { return 1.12 }
+        if isHighlighted { return 1.04 }
+        return 1.0
+    }
+
     var body: some View {
         ZStack {
             RoundedRectangle(cornerRadius: 32, style: .continuous)
@@ -36,7 +42,7 @@ struct MonthCard: View {
             }
         }
         .shadow(color: isHighlighted ? .white.opacity(0.8) : .clear, radius: 12)
-        .scaleEffect(isTapped ? 1.12 : (isHighlighted ? 1.04 : 1.0))
+        .scaleEffect(cardScale)
         .contentShape(RoundedRectangle(cornerRadius: 32, style: .continuous))
         .rotation3DEffect(.degrees(isTapped ? 6 : 0), axis: (x: 1, y: 0, z: 0))
         .animation(.spring(response: 0.35, dampingFraction: 0.5), value: isTapped)
diff --git a/DayByDay/SeasonCard.swift b/DayByDay/SeasonCard.swift
index c84dfb6..e64aa21 100644
--- a/DayByDay/SeasonCard.swift
+++ b/DayByDay/SeasonCard.swift
@@ -12,6 +12,12 @@ struct SeasonCard: View {
     var isHighlighted = false
     @State private var isTapped = false
 
+    private var cardScale: CGFloat {
+        if isTapped { return 1.12 }
+        if isHighlighted { return 1.04 }
+        return 1.0
+    }
+
     var body: some View {
         ZStack {
             RoundedRectangle(cornerRadius: 32, style: .continuous)
@@ -36,7 +42,7 @@ struct SeasonCard: View {
             }
         }
         .shadow(color: isHighlighted ? .white.opacity(0.8) : .clear, radius: 12)
-        .scaleEffect(isTapped ? 1.12 : (isHighlighted ? 1.04 : 1.0))
+        .scaleEffect(cardScale)
         .contentShape(RoundedRectangle(cornerRadius: 32, style: .continuous))
         .rotation3DEffect(.degrees(isTapped ? 6 : 0), axis: (x: 1, y: 0, z: 0))
         .animation(.spring(response: 0.35, dampingFraction: 0.5), value: isTapped)
diff --git a/NumberCard.swift b/NumberCard.swift
index 9ae1c39..ada937b 100644
--- a/NumberCard.swift
+++ b/NumberCard.swift
@@ -12,6 +12,12 @@ struct NumberCard: View {
     var isHighlighted = false
     @State private var isTapped = false
 
+    private var cardScale: CGFloat {
+        if isTapped { return 1.12 }
+        if isHighlighted { return 1.04 }
+        return 1.0
+    }
+
     var body: some View {
         ZStack {
             RoundedRectangle(cornerRadius: 32, style: .continuous)
@@ -39,7 +45,7 @@ struct NumberCard: View {
             }
         }
         .shadow(color: isHighlighted ? .white.opacity(0.8) : .clear, radius: 12)
-        .scaleEffect(isTapped ? 1.12 : (isHighlighted ? 1.04 : 1.0))
+        .scaleEffect(cardScale)
         .contentShape(RoundedRectangle(cornerRadius: 32, style: .continuous))
         .rotation3DEffect(.degrees(isTapped ? 6 : 0), axis: (x: 1, y: 0, z: 0))
         .animation(.spring(response: 0.35, dampingFraction: 0.5), value: isTapped)
@@ -60,7 +66,7 @@ struct NumberCard: View {
 enum LearnNumber: Int, CaseIterable, Identifiable {
     case one = 1, two, three, four, five, six, seven, eight, nine, ten
 
-    var id: Int { rawValue }
+    var id: LearnNumber { self }
 
     /// Highlight the number matching today's day-of-month if it falls in 1–10.
     static var current: LearnNumber? {