Skip to content

Commit d531d51

Browse files
authored
Поднял версию swift до 5.9 и сделал форматирование (#112)
1 parent eca588f commit d531d51

34 files changed

+200
-207
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.7.1
1+
5.9

SwiftUI-WorkoutApp/DateFormatterService/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.7.1
1+
// swift-tools-version: 5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

SwiftUI-WorkoutApp/DateFormatterService/Sources/DateFormatterService/DateFormatterService.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,16 @@ public extension DateFormatterService {
6767
showTimeInThisYear: Bool
6868
) -> (prefix: String, date: String) {
6969
if date.isToday {
70-
return ("", mediumTime.rawValue)
70+
("", mediumTime.rawValue)
7171
} else if date.isYesterday {
72-
return ("Вчера, ", mediumTime.rawValue)
72+
("Вчера, ", mediumTime.rawValue)
7373
} else if date.isThisYear {
74-
return (
74+
(
7575
"",
7676
showTimeInThisYear ? dayMonthMediumTime.rawValue : dayMonth.rawValue
7777
)
7878
} else {
79-
return ("", dayMonthYear.rawValue)
79+
("", dayMonthYear.rawValue)
8080
}
8181
}
8282
}

SwiftUI-WorkoutApp/DesignSystem/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.7.1
1+
// swift-tools-version: 5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

SwiftUI-WorkoutApp/DesignSystem/Sources/DesignSystem/CachedImage/CachedImage.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ public extension CachedImage {
5555
var size: CGSize {
5656
switch self {
5757
case .userListItem, .journalAvatar:
58-
return .init(width: 42, height: 42)
58+
.init(width: 42, height: 42)
5959
case .groundListItem, .eventListItem, .dialogListItem:
60-
return .init(width: 74, height: 74)
60+
.init(width: 74, height: 74)
6161
case .genericListItem, .journalEntry:
62-
return .init(width: 24, height: 24)
62+
.init(width: 24, height: 24)
6363
case .eventPhoto, .groundPhoto:
64-
return .init(width: 300, height: 250)
64+
.init(width: 300, height: 250)
6565
case .gridPhoto:
66-
return .init(width: 150, height: 150)
66+
.init(width: 150, height: 150)
6767
case .commentAvatar:
68-
return .init(width: 40, height: 40)
68+
.init(width: 40, height: 40)
6969
case .avatarInDialogView:
70-
return .init(width: 32, height: 32)
70+
.init(width: 32, height: 32)
7171
case .profileAvatar:
72-
return .init(width: 150, height: 150)
72+
.init(width: 150, height: 150)
7373
}
7474
}
7575
}

SwiftUI-WorkoutApp/DesignSystem/Sources/DesignSystem/Rows/JournalRowView.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,26 +75,26 @@ public extension JournalRowView {
7575
case edit, setup, report, delete
7676
var title: String {
7777
switch self {
78-
case .edit: return "Изменить"
79-
case .setup: return "Настроить"
80-
case .report: return "Пожаловаться"
81-
case .delete: return "Удалить"
78+
case .edit: "Изменить"
79+
case .setup: "Настроить"
80+
case .report: "Пожаловаться"
81+
case .delete: "Удалить"
8282
}
8383
}
8484

8585
var systemImageName: String {
8686
switch self {
87-
case .edit: return "pencil"
88-
case .setup: return "gearshape"
89-
case .report: return "exclamationmark.triangle"
90-
case .delete: return "trash"
87+
case .edit: "pencil"
88+
case .setup: "gearshape"
89+
case .report: "exclamationmark.triangle"
90+
case .delete: "trash"
9191
}
9292
}
9393

9494
var buttonRole: ButtonRole? {
9595
switch self {
96-
case .report, .delete: return .destructive
97-
default: return nil
96+
case .report, .delete: .destructive
97+
default: nil
9898
}
9999
}
100100
}

SwiftUI-WorkoutApp/DesignSystem/Sources/DesignSystem/SWButtonStyle.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public extension SWButtonStyle {
9090
/// Описание для превью
9191
var description: String {
9292
switch self {
93-
case .filled: return "Filled"
94-
case .tinted: return "Tinted"
93+
case .filled: "Filled"
94+
case .tinted: "Tinted"
9595
}
9696
}
9797
}
@@ -103,8 +103,8 @@ public extension SWButtonStyle {
103103
/// Описание для превью
104104
var description: String {
105105
switch self {
106-
case .large: return "Large"
107-
case .small: return "Small"
106+
case .large: "Large"
107+
case .small: "Small"
108108
}
109109
}
110110
}

SwiftUI-WorkoutApp/DesignSystem/Sources/DesignSystem/Section/SectionHeaderView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ struct SectionSupplementaryView: View {
3030

3131
private var vPadding: (edges: Edge.Set, value: CGFloat) {
3232
switch mode {
33-
case .header: return (.bottom, 6)
34-
case .footer: return (.top, 12)
33+
case .header: (.bottom, 6)
34+
case .footer: (.top, 12)
3535
}
3636
}
3737
}
@@ -44,9 +44,9 @@ extension SectionSupplementaryView {
4444
var hasLeftPadding: Bool {
4545
switch self {
4646
case let .header(hasLeftPadding):
47-
return hasLeftPadding
47+
hasLeftPadding
4848
case .footer:
49-
return true
49+
true
5050
}
5151
}
5252
}

SwiftUI-WorkoutApp/SWModels/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 5.7.1
1+
// swift-tools-version: 5.9
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription

SwiftUI-WorkoutApp/SWModels/Sources/SWModels/Complaint.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,38 @@ public enum Complaint {
1313
public var subject: String {
1414
switch self {
1515
case .eventPhoto:
16-
return Complaint.subjectFirstPart + "фото к мероприятию"
16+
Complaint.subjectFirstPart + "фото к мероприятию"
1717
case .eventComment:
18-
return Complaint.subjectFirstPart + "комментарий к мероприятию"
18+
Complaint.subjectFirstPart + "комментарий к мероприятию"
1919
case .groundPhoto:
20-
return Complaint.subjectFirstPart + "фото к площадке"
20+
Complaint.subjectFirstPart + "фото к площадке"
2121
case .groundComment:
22-
return Complaint.subjectFirstPart + "комментарий к площадке"
22+
Complaint.subjectFirstPart + "комментарий к площадке"
2323
case .journalEntry:
24-
return Complaint.subjectFirstPart + "запись в дневнике"
24+
Complaint.subjectFirstPart + "запись в дневнике"
2525
}
2626
}
2727

2828
public var body: String {
2929
switch self {
3030
case let .eventPhoto(eventTitle):
31-
return "Наименование мероприятия: \(eventTitle)"
31+
"Наименование мероприятия: \(eventTitle)"
3232
case let .eventComment(eventTitle, author, commentText):
33-
return """
33+
"""
3434
- Наименование мероприятия: \(eventTitle)
3535
- Автор комментария: \(author)
3636
- Текст комментария: \(commentText)
3737
"""
3838
case let .groundPhoto(groundTitle):
39-
return "Наименование площадки: \(groundTitle)"
39+
"Наименование площадки: \(groundTitle)"
4040
case let .groundComment(groundTitle, author, commentText):
41-
return """
41+
"""
4242
- Наименование площадки: \(groundTitle)
4343
- Автор комментария: \(author)
4444
- Текст комментария: \(commentText)
4545
"""
4646
case let .journalEntry(author, entryText):
47-
return """
47+
"""
4848
Автор записи: \(author)
4949
Текст записи: \(entryText)
5050
"""

0 commit comments

Comments
 (0)