Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix small typo #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions PasscodeLock/PasscodeLock/EnterPasscodeState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct EnterPasscodeState: PasscodeLockStateType {
let isCancellableAction: Bool
var isTouchIDAllowed = true

private var inccorectPasscodeAttempts = 0
private var incorrectPasscodeAttempts = 0
private var isNotificationSent = false

init(allowCancellation: Bool = false) {
Expand All @@ -39,9 +39,9 @@ struct EnterPasscodeState: PasscodeLockStateType {

} else {

inccorectPasscodeAttempts += 1
incorrectPasscodeAttempts += 1

if inccorectPasscodeAttempts >= lock.configuration.maximumInccorectPasscodeAttempts {
if incorrectPasscodeAttempts >= lock.configuration.maximumIncorrectPasscodeAttempts {

postNotification()
}
Expand Down
2 changes: 1 addition & 1 deletion PasscodeLock/Protocols/PasscodeLockConfigurationType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ public protocol PasscodeLockConfigurationType {
var isTouchIDAllowed: Bool {get set}
var shouldRequestTouchIDImmediately: Bool {get}
var touchIdReason: String? {get set}
var maximumInccorectPasscodeAttempts: Int {get}
var maximumIncorrectPasscodeAttempts: Int {get}
}
2 changes: 1 addition & 1 deletion PasscodeLockDemo/PasscodeLockConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct PasscodeLockConfiguration: PasscodeLockConfigurationType {
let passcodeLength = 4
var isTouchIDAllowed = true
let shouldRequestTouchIDImmediately = true
let maximumInccorectPasscodeAttempts = -1
let maximumIncorrectPasscodeAttempts = -1

init(repository: PasscodeRepositoryType) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class FakePasscodeLockConfiguration: PasscodeLockConfigurationType {
let repository: PasscodeRepositoryType
let passcodeLength = 4
var isTouchIDAllowed = false
let maximumInccorectPasscodeAttempts = 3
let maximumIncorrectPasscodeAttempts = 3
let shouldRequestTouchIDImmediately = false
var touchIdReason: String? = nil

Expand Down