Skip to content

Commit

Permalink
Merge pull request #4 from playlist/master
Browse files Browse the repository at this point in the history
Fix "open static" problem in Swift 5
  • Loading branch information
jasonnam authored May 21, 2019
2 parents d6f50fe + f13c531 commit 28f695a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Source/Navajo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ open class Navajo {
/// - parameter password: Password string to be calculated
///
/// - returns: Level of strength in NJOPasswordStrength
open static func strength(ofPassword password: String) -> PasswordStrength {
public static func strength(ofPassword password: String) -> PasswordStrength {
return passwordStrength(forEntropy: entropy(of: password))
}

Expand All @@ -57,7 +57,7 @@ open class Navajo {
/// - parameter strength: NJOPasswordStrength to be converted
///
/// - returns: Localized string
open static func localizedString(forStrength strength: PasswordStrength) -> String {
public static func localizedString(forStrength strength: PasswordStrength) -> String {
switch strength {
case .veryWeak:
return NSLocalizedString("NAVAJO_VERY_WEAK", tableName: nil, bundle: Bundle.main, value: "Very Weak", comment: "Navajo - Very weak")
Expand Down
4 changes: 2 additions & 2 deletions Source/PasswordValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ open class PasswordValidator {
open var rules: [PasswordRule] = []

/// PasswordValidator object which checks if the length of password is between 6 and 24.
open static var standard: PasswordValidator {
public static var standard: PasswordValidator {
return PasswordValidator(rules: [standardLengthRule])
}

/// Length rule having minimum of 6 and maximum of 24.
open static var standardLengthRule: LengthRule {
public static var standardLengthRule: LengthRule {
return LengthRule(min: 6, max: 24)
}

Expand Down

0 comments on commit 28f695a

Please # to comment.