Skip to content

Commit

Permalink
Removed unnecessary optional UIAlertAction return types
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelCampbell committed Jan 6, 2016
1 parent af32842 commit a731565
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Yoshi/Yoshi/DebugConfigurationManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ internal class DebugConfigurationManager {
for menu in self.yoshiMenuItems {
switch menu {
case let menuType as YoshiTableViewMenu:
guard let tableViewAction = self.tableViewAction(menuType) else { continue }
let tableViewAction = self.tableViewAction(menuType)
self.debugAlertController.addAction(tableViewAction)
case let menuType as YoshiDateSelectorMenu:
guard let datePickerAction = self.dateSelectorAction(menuType) else { continue }
let datePickerAction = self.dateSelectorAction(menuType)
self.debugAlertController.addAction(datePickerAction)
case let menuType as YoshiCustomMenu:
guard let customMenuAction = self.customMenuAction(menuType) else { continue }
let customMenuAction = self.customMenuAction(menuType)
self.debugAlertController.addAction(customMenuAction)
default:
continue
Expand Down Expand Up @@ -65,7 +65,7 @@ internal class DebugConfigurationManager {
}
}

private func tableViewAction(menu: YoshiTableViewMenu) -> UIAlertAction? {
private func tableViewAction(menu: YoshiTableViewMenu) -> UIAlertAction {
return UIAlertAction(title: menu.debugMenuName, style: .Default) { (_) -> Void in
let bundle = NSBundle(forClass: DebugConfigurationManager.self)
let tableViewController = DebugTableViewController(nibName: DebugTableViewController.nibName(), bundle: bundle)
Expand All @@ -76,7 +76,7 @@ internal class DebugConfigurationManager {
}
}

private func dateSelectorAction(menu: YoshiDateSelectorMenu) -> UIAlertAction? {
private func dateSelectorAction(menu: YoshiDateSelectorMenu) -> UIAlertAction {
return UIAlertAction(title: menu.debugMenuName, style: .Default, handler: { (_) -> Void in
let bundle = NSBundle(forClass: DebugConfigurationManager.self)
let datePickerViewController = DebugDatePickerViewController(nibName: DebugDatePickerViewController.nibName(), bundle: bundle)
Expand All @@ -87,7 +87,7 @@ internal class DebugConfigurationManager {
})
}

private func customMenuAction(menu: YoshiCustomMenu) -> UIAlertAction? {
private func customMenuAction(menu: YoshiCustomMenu) -> UIAlertAction {
menu.setup()
return UIAlertAction(title: menu.debugMenuName, style: .Default) { (_) -> Void in
menu.completion()
Expand Down

0 comments on commit a731565

Please sign in to comment.