Skip to content

Commit bab234a

Browse files
Mark Pospeselmpospese
authored andcommitted
[CM-604] Implicit returns
1 parent 1b53dbf commit bab234a

File tree

5 files changed

+8
-20
lines changed

5 files changed

+8
-20
lines changed

Sources/YMatterType/Elements/TypographyLabel.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,7 @@ open class TypographyLabel: UILabel {
7474

7575
/// :nodoc:
7676
override public var text: String! {
77-
get {
78-
return super.text
79-
}
77+
get { super.text }
8078
set {
8179
// When text is set, we may need to re-style it as attributedText
8280
// with the correct paragraph style to achieve the desired line height.
@@ -87,9 +85,7 @@ open class TypographyLabel: UILabel {
8785

8886
/// :nodoc:
8987
override public var attributedText: NSAttributedString? {
90-
get {
91-
return super.attributedText
92-
}
88+
get { super.attributedText }
9389
set {
9490
// When text is set, we may need to re-style it as attributedText
9591
// with the correct paragraph style to achieve the desired line height.

Sources/YMatterType/Elements/TypographyTextField.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,7 @@ open class TypographyTextField: UITextField {
8787

8888
/// :nodoc:
8989
override public var text: String! {
90-
get {
91-
return super.text
92-
}
90+
get { super.text }
9391
set {
9492
// When text is set, we may need to re-style it as attributedText
9593
// with the correct paragraph style to achieve the desired line height.
@@ -100,9 +98,7 @@ open class TypographyTextField: UITextField {
10098

10199
/// :nodoc:
102100
override public var attributedText: NSAttributedString? {
103-
get {
104-
return super.attributedText
105-
}
101+
get { super.attributedText }
106102
set {
107103
// When text is set, we may need to re-style it as attributedText
108104
// with the correct paragraph style to achieve the desired line height.

Sources/YMatterType/Elements/TypographyTextView.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ open class TypographyTextView: UITextView {
7878

7979
/// :nodoc:
8080
override public var text: String! {
81-
get {
82-
return super.text
83-
}
81+
get { super.text }
8482
set {
8583
// When text is set, we may need to re-style it as attributedText
8684
// with the correct paragraph style to achieve the desired line height.
@@ -91,9 +89,7 @@ open class TypographyTextView: UITextView {
9189

9290
/// :nodoc:
9391
override public var attributedText: NSAttributedString? {
94-
get {
95-
return super.attributedText
96-
}
92+
get { super.attributedText }
9793
set {
9894
// When text is set, we may need to re-style it as attributedText
9995
// with the correct paragraph style to achieve the desired line height.

Sources/YMatterType/Typography/FontInfo.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ public struct FontInfo: FontRepresentable {
3333
/// e.g. "Italic" is a typical suffix for Italic fonts.
3434
/// default = ""
3535
public var fontNameSuffix: String {
36-
return isItalic ? FontInfo.italicSuffix : ""
36+
isItalic ? FontInfo.italicSuffix : ""
3737
}
3838
}

Tests/YMatterTypeTests/Helpers/CGFloat+rounded.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension CGFloat {
1919
_ rule: FloatingPointRoundingRule = .toNearestOrAwayFromZero,
2020
scale: CGFloat
2121
) -> CGFloat {
22-
return (self * scale).rounded(rule) / scale
22+
(self * scale).rounded(rule) / scale
2323
}
2424

2525
/// Floors float to 1/scale, e.g. round down to nearest 0.5 on 2x scale, or 0.333 on 3x scale.

0 commit comments

Comments
 (0)