Skip to content

Commit 5e625c4

Browse files
author
Daniel Browne
committed
Enable 'prefer_self_type_over_type_of_self' SwiftLint rule
1 parent 275c51c commit 5e625c4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ opt_in_rules:
1010
- closure_spacing
1111
- explicit_init
1212
- modifier_order
13+
- prefer_self_type_over_type_of_self
1314
- vertical_whitespace_between_cases
1415
- vertical_whitespace_closing_braces
1516

Sources/Models/PusherChannel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public enum PusherChannelType {
66
case normal
77

88
public init(name: String) {
9-
self = Swift.type(of: self).type(forName: name)
9+
self = Self.type(forName: name)
1010
}
1111

1212
public static func type(forName name: String) -> PusherChannelType {

0 commit comments

Comments
 (0)