Skip to content

Commit

Permalink
Mark classes as final
Browse files Browse the repository at this point in the history
Issue #243
  • Loading branch information
eofster committed Jul 19, 2016
1 parent 148d10d commit 2f71c76
Show file tree
Hide file tree
Showing 118 changed files with 126 additions and 126 deletions.
2 changes: 1 addition & 1 deletion Domain/SystemToUserAgentAudioDeviceMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

public class SystemToUserAgentAudioDeviceMap {
public final class SystemToUserAgentAudioDeviceMap {
private let systemDevices: [SystemAudioDevice]
private let userAgentDevices: [UserAgentAudioDevice]
private var IDMap: [SystemAudioDeviceID: UserAgentAudioDeviceID] = [:]
Expand Down
2 changes: 1 addition & 1 deletion Domain/UserAgentAudioDeviceNameToDeviceMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class UserAgentAudioDeviceNameToDeviceMap {
final class UserAgentAudioDeviceNameToDeviceMap {
private let devices: [UserAgentAudioDevice]
private var inputMap: [String: UserAgentAudioDevice] = [:]
private var outputMap: [String: UserAgentAudioDevice] = [:]
Expand Down
2 changes: 1 addition & 1 deletion DomainTestDoubles/SystemAudioDeviceTestFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import Domain

public class SystemAudioDeviceTestFactory {
public final class SystemAudioDeviceTestFactory {
public let all: [SystemAudioDevice]
public let allInput: [SystemAudioDevice]
public let allOutput: [SystemAudioDevice]
Expand Down
2 changes: 1 addition & 1 deletion DomainTests/FallingBackSoundIOTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import DomainTestDoubles
import XCTest

class FallingBackSoundIOTests: XCTestCase {
final class FallingBackSoundIOTests: XCTestCase {
private var anyDevice: SystemAudioDevice!

override func setUp() {
Expand Down
2 changes: 1 addition & 1 deletion DomainTests/FirstBuiltInSystemSoundIOTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import DomainTestDoubles
import XCTest

class FirstBuiltInSystemSoundIOTests: XCTestCase {
final class FirstBuiltInSystemSoundIOTests: XCTestCase {
private var factory: SystemAudioDeviceTestFactory!

override func setUp() {
Expand Down
2 changes: 1 addition & 1 deletion DomainTests/FirstSystemAudioDeviceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import DomainTestDoubles
import XCTest

class FirstSystemAudioDeviceTests: XCTestCase {
final class FirstSystemAudioDeviceTests: XCTestCase {
private var factory: SystemAudioDeviceTestFactory!

override func setUp() {
Expand Down
2 changes: 1 addition & 1 deletion DomainTests/FirstSystemSoundIOTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import DomainTestDoubles
import XCTest

class FirstSystemSoundIOTests: XCTestCase {
final class FirstSystemSoundIOTests: XCTestCase {
private var factory: SystemAudioDeviceTestFactory!

override func setUp() {
Expand Down
2 changes: 1 addition & 1 deletion DomainTests/PreferredSoundIOTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Domain
import DomainTestDoubles
import XCTest

class PreferredSoundIOTests: XCTestCase {
final class PreferredSoundIOTests: XCTestCase {
func testPrefersFirstBuiltInDevices() {
let factory = SystemAudioDeviceTestFactory()

Expand Down
2 changes: 1 addition & 1 deletion DomainTests/SimpleSoundIOTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import DomainTestDoubles
import XCTest

class SimpleSoundIOTests: XCTestCase {
final class SimpleSoundIOTests: XCTestCase {
func testCanCreateWithSystemSoundIO() {
let factory = SystemAudioDeviceTestFactory()
let systemIO = SimpleSystemSoundIO(
Expand Down
2 changes: 1 addition & 1 deletion DomainTests/SystemAudioDevicesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import DomainTestDoubles
import XCTest

class SystemAudioDevicesTests: XCTestCase {
final class SystemAudioDevicesTests: XCTestCase {
private var factory: SystemAudioDeviceTestFactory!
private var sut: SystemAudioDevices!

Expand Down
2 changes: 1 addition & 1 deletion DomainTests/SystemToUserAgentAudioDeviceMapTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import DomainTestDoubles
import XCTest

class SystemToUserAgentAudioDeviceMapTests: XCTestCase {
final class SystemToUserAgentAudioDeviceMapTests: XCTestCase {
private var factory: SystemAudioDeviceTestFactory!

override func setUp() {
Expand Down
2 changes: 1 addition & 1 deletion Telephone/AsyncFailingProductsFake.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class AsyncFailingProductsFake {
final class AsyncFailingProductsFake {
let all: [Product] = []
private let target: ProductsEventTarget

Expand Down
2 changes: 1 addition & 1 deletion Telephone/AsyncProductsFake.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class AsyncProductsFake {
final class AsyncProductsFake {
private let products: [String: Product]
private let target: ProductsEventTarget
private var attempts = 0
Expand Down
2 changes: 1 addition & 1 deletion Telephone/CompositionRoot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import Foundation
import UseCases

class CompositionRoot: NSObject {
final class CompositionRoot: NSObject {
let userAgent: AKSIPUserAgent
let preferencesController: PreferencesController
let ringtonePlayback: RingtonePlaybackUseCase
Expand Down
2 changes: 1 addition & 1 deletion Telephone/DefaultSoundPreferencesViewEventTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class DefaultSoundPreferencesViewEventTarget: NSObject {
final class DefaultSoundPreferencesViewEventTarget: NSObject {
private let useCaseFactory: UseCaseFactory
private let presenterFactory: PresenterFactory
private let userAgentSoundIOSelection: UseCase
Expand Down
2 changes: 1 addition & 1 deletion Telephone/DefaultStoreUseCaseFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class DefaultStoreUseCaseFactory {
final class DefaultStoreUseCaseFactory {
private let products: Products
private let store: Store
private let targets: ProductsEventTargets
Expand Down
2 changes: 1 addition & 1 deletion Telephone/DefaultStoreViewEventTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class DefaultStoreViewEventTarget {
final class DefaultStoreViewEventTarget {
private(set) var state: StoreViewState = StoreViewStateNoProducts()
private var products: [Product] = []

Expand Down
2 changes: 1 addition & 1 deletion Telephone/DefaultStoreViewEventTargetTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import UseCases
import UseCasesTestDoubles
import XCTest

class DefaultStoreViewEventTargetTests: XCTestCase {
final class DefaultStoreViewEventTargetTests: XCTestCase {
func testExecutesProductsFetchOnFetchProducts() {
let useCase = UseCaseSpy()
let factory = StoreUseCaseFactorySpy()
Expand Down
2 changes: 1 addition & 1 deletion Telephone/DefaultStoreViewPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class DefaultStoreViewPresenter {
final class DefaultStoreViewPresenter {
private let output: StoreViewPresenterOutput

init(output: StoreViewPresenterOutput) {
Expand Down
2 changes: 1 addition & 1 deletion Telephone/DefaultUseCaseFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class DefaultUseCaseFactory {
final class DefaultUseCaseFactory {
private let repository: SystemAudioDeviceRepository
private let userDefaults: UserDefaults

Expand Down
2 changes: 1 addition & 1 deletion Telephone/LoggingProducts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class LoggingProducts {
final class LoggingProducts {
private let origin: Products

init(origin: Products) {
Expand Down
2 changes: 1 addition & 1 deletion Telephone/NSSoundToSoundAdapter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class NSSoundToSoundAdapter: NSObject {
final class NSSoundToSoundAdapter: NSObject {
private let sound: NSSound
private let eventTarget: SoundEventTarget

Expand Down
2 changes: 1 addition & 1 deletion Telephone/NSSoundToSoundAdapterFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class NSSoundToSoundAdapterFactory {
final class NSSoundToSoundAdapterFactory {
func createSound(configuration configuration: SoundConfiguration, eventTarget: SoundEventTarget) throws -> Sound {
if let sound = NSSound(named: configuration.name) {
updateSound(sound, withDeviceID: configuration.deviceUID)
Expand Down
2 changes: 1 addition & 1 deletion Telephone/NSTimerToTimerAdapter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class NSTimerToTimerAdapter {
final class NSTimerToTimerAdapter {
private let action: () -> Void

var timer: NSTimer!
Expand Down
2 changes: 1 addition & 1 deletion Telephone/NSTimerToTimerAdapterFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class NSTimerToTimerAdapterFactory: TimerFactory {
final class NSTimerToTimerAdapterFactory: TimerFactory {
func createRepeatingTimer(interval interval: Double, action: () -> Void) -> Timer {
let timer = NSTimerToTimerAdapter(action: action)
timer.timer = NSTimer.scheduledTimerWithTimeInterval(
Expand Down
2 changes: 1 addition & 1 deletion Telephone/NullStoreViewEventTarget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class NullStoreViewEventTarget: StoreViewEventTarget {
final class NullStoreViewEventTarget: StoreViewEventTarget {
func viewShouldReloadData(view: StoreView) {}
func viewDidStartProductFetch() {}
func viewDidMakePurchase(product: PresentationProduct) {}
Expand Down
2 changes: 1 addition & 1 deletion Telephone/PreferencesSoundIOUpdater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class PreferencesSoundIOUpdater {
final class PreferencesSoundIOUpdater {
private let preferences: SoundIOPreferences

init(preferences: SoundIOPreferences) {
Expand Down
2 changes: 1 addition & 1 deletion Telephone/PresentationProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class PresentationProduct: NSObject {
final class PresentationProduct: NSObject {
let identifier: String
let name: String
let price: String
Expand Down
2 changes: 1 addition & 1 deletion Telephone/PresenterFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// GNU General Public License for more details.
//

class PresenterFactory {
final class PresenterFactory {
func createSoundIOPresenter(output output: SoundIOPresenterOutput) -> SoundIOPresenter {
return SoundIOPresenter(output: output)
}
Expand Down
2 changes: 1 addition & 1 deletion Telephone/RepeatingSoundFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class RepeatingSoundFactory {
final class RepeatingSoundFactory {
private let soundFactory: SoundFactory
private let timerFactory: TimerFactory

Expand Down
2 changes: 1 addition & 1 deletion Telephone/RepeatingSoundFactoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import UseCases
import UseCasesTestDoubles
import XCTest

class RepeatingSoundFactoryTests: XCTestCase {
final class RepeatingSoundFactoryTests: XCTestCase {
private var factory: SoundFactorySpy!
private var sut: RepeatingSoundFactory!

Expand Down
2 changes: 1 addition & 1 deletion Telephone/SKProductsRequestToProductsAdapter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import StoreKit
import UseCases

class SKProductsRequestToProductsAdapter: NSObject {
final class SKProductsRequestToProductsAdapter: NSObject {
private var products: [String: Product] = [:]
private var storeKitProducts: [Product: SKProduct] = [:]
private var request: SKProductsRequest?
Expand Down
2 changes: 1 addition & 1 deletion Telephone/SoundIOPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import UseCases

class SoundIOPresenter {
final class SoundIOPresenter {
private let output: SoundIOPresenterOutput

init(output: SoundIOPresenterOutput) {
Expand Down
2 changes: 1 addition & 1 deletion Telephone/StoreViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import Cocoa
import UseCases

class StoreViewController: NSViewController {
final class StoreViewController: NSViewController {
private var target: StoreViewEventTarget
private dynamic var products: [PresentationProduct] = []

Expand Down
18 changes: 9 additions & 9 deletions Telephone/StoreViewState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class StoreViewState {
}
}

class StoreViewStateNoProducts: StoreViewState {
final class StoreViewStateNoProducts: StoreViewState {
override func viewShouldReloadData(machine machine: StoreViewStateMachine) {
machine.changeState(StoreViewStateFetching())
machine.fetchProducts()
Expand All @@ -122,7 +122,7 @@ class StoreViewStateNoProducts: StoreViewState {
}
}

class StoreViewStateFetching: StoreViewState {
final class StoreViewStateFetching: StoreViewState {
override func didFetchProducts(machine machine: StoreViewStateMachine, products: [Product]) {
machine.changeState(StoreViewStateFetched())
machine.showProducts(products)
Expand All @@ -139,7 +139,7 @@ class StoreViewStateFetching: StoreViewState {
}
}

class StoreViewStateFetched: StoreViewState {
final class StoreViewStateFetched: StoreViewState {
override func viewDidMakePurchase(machine machine: StoreViewStateMachine, product: PresentationProduct) {
machine.purchaseProduct(withIdentifier: product.identifier)
}
Expand All @@ -160,7 +160,7 @@ class StoreViewStateFetched: StoreViewState {
}
}

class StoreViewStateFetchError: StoreViewState {
final class StoreViewStateFetchError: StoreViewState {
override func viewShouldReloadData(machine machine: StoreViewStateMachine) {
machine.changeState(StoreViewStateFetching())
machine.fetchProducts()
Expand All @@ -182,7 +182,7 @@ class StoreViewStateFetchError: StoreViewState {
}
}

class StoreViewStatePurchasing: StoreViewState {
final class StoreViewStatePurchasing: StoreViewState {
override func didPurchase(machine machine: StoreViewStateMachine, product: Product) {
machine.changeState(StoreViewStatePurchased())
machine.showThankYou()
Expand All @@ -199,13 +199,13 @@ class StoreViewStatePurchasing: StoreViewState {
}
}

class StoreViewStatePurchased: StoreViewState {
final class StoreViewStatePurchased: StoreViewState {
override func viewShouldReloadData(machine machine: StoreViewStateMachine) {
machine.showThankYou()
}
}

class StoreViewStatePurchaseError: StoreViewState {
final class StoreViewStatePurchaseError: StoreViewState {
override func viewDidMakePurchase(machine machine: StoreViewStateMachine, product: PresentationProduct) {
machine.purchaseProduct(withIdentifier: product.identifier)
}
Expand All @@ -221,7 +221,7 @@ class StoreViewStatePurchaseError: StoreViewState {
}
}

class StoreViewStateRestoringPurchases: StoreViewState {
final class StoreViewStateRestoringPurchases: StoreViewState {
override func didPurchase(machine machine: StoreViewStateMachine, product: Product) {
machine.changeState(StoreViewStatePurchased())
machine.showThankYou()
Expand All @@ -238,7 +238,7 @@ class StoreViewStateRestoringPurchases: StoreViewState {
}
}

class StoreViewStatePurchaseRestorationError: StoreViewState {
final class StoreViewStatePurchaseRestorationError: StoreViewState {
override func didPurchase(machine machine: StoreViewStateMachine, product: Product) {
machine.changeState(StoreViewStatePurchased())
machine.showThankYou()
Expand Down
2 changes: 1 addition & 1 deletion Telephone/StoreWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import Cocoa

class StoreWindowController: NSWindowController {
final class StoreWindowController: NSWindowController {
convenience init(contentViewController controller: NSViewController) {
self.init(windowNibName: "StoreWindowController")
contentViewController = controller
Expand Down
Loading

0 comments on commit 2f71c76

Please sign in to comment.