<commit_before>//
//  FeedbackNavigationController.swift
//  PinpointKit
//
//  Created by <NAME> on 2/19/16.
//  Copyright © 2016 Lickability. All rights reserved.
//

import UIKit

/// A `UINavigationController` subclass that has a `FeedbackViewController` as its root view controller. Use this class as a `FeedbackCollector`.
public final class FeedbackNavigationController: UINavigationController, FeedbackCollector {
    
    // MARK: - InterfaceCustomizable
    
    public var interfaceCustomization: InterfaceCustomization? {
        get {
            return feedbackViewController.interfaceCustomization
        }
        set {
            feedbackViewController.interfaceCustomization = newValue
            view.tintColor = interfaceCustomization?.appearance.tintColor
        }
    }
    
    // MARK: - LogSupporting
    
    public var logViewer: LogViewer? {
        get {
            return feedbackViewController.logViewer
        }
        set {
            feedbackViewController.logViewer = newValue
        }
    }
    
    public var logCollector: LogCollector? {
        get {
            return feedbackViewController.logCollector
        }
        set {
            feedbackViewController.logCollector = newValue
        }
    }
    
    // MARK: - FeedbackCollector
    
    public var editor: Editor? {
        get {
            return feedbackViewController.editor
        }
        set {
            feedbackViewController.editor = newValue
        }
    }
    
    public var feedbackConfiguration: FeedbackConfiguration? {
        get {
            return feedbackViewController.feedbackConfiguration
        }
        set {
            feedbackViewController.feedbackConfiguration = newValue
        }
    }
    
    public var feedbackDelegate: FeedbackCollectorDelegate? {
        get {
            return feedbackViewController.feedbackDelegate
        }
        set {
            feedbackViewController.feedbackDelegate = newValue
        }
    }
    
    // MARK: - FeedbackNavigationController

    /// The root view controller used to collect feedback.
    let feedbackViewController: FeedbackViewController
    
    override init(navigationBarClass: AnyClass?, toolbarClass: AnyClass?) {
        feedbackViewController = FeedbackViewController()
        
        super.init(navigationBarClass: navigationBarClass, toolbarClass: toolbarClass)
     
        commonInitialization()
    }
    
    convenience init() {
        self.init(navigationBarClass: nil, toolbarClass: nil)
    }
    
    @available(*, unavailable)
    override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
        feedbackViewController = FeedbackViewController()
        
        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    }
    
    @available(*, unavailable)
    override init(rootViewController: UIViewController) {
        fatalError("init(rootViewController:) is not supported. Use init() or init(navigationBarClass:, toolbarClass:)")
    }

    @available(*, unavailable)
    required public init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: - FeedbackNavigationController
    
    private func commonInitialization() {
        viewControllers = [feedbackViewController]
    }<commit_msg>Make convenience initializer publicly accessible<commit_after>//
//  FeedbackNavigationController.swift
//  PinpointKit
//
//  Created by <NAME> on 2/19/16.
//  Copyright © 2016 Lickability. All rights reserved.
//

import UIKit

/// A `UINavigationController` subclass that has a `FeedbackViewController` as its root view controller. Use this class as a `FeedbackCollector`.
public final class FeedbackNavigationController: UINavigationController, FeedbackCollector {
    
    // MARK: - InterfaceCustomizable
    
    public var interfaceCustomization: InterfaceCustomization? {
        get {
            return feedbackViewController.interfaceCustomization
        }
        set {
            feedbackViewController.interfaceCustomization = newValue
            view.tintColor = interfaceCustomization?.appearance.tintColor
        }
    }
    
    // MARK: - LogSupporting
    
    public var logViewer: LogViewer? {
        get {
            return feedbackViewController.logViewer
        }
        set {
            feedbackViewController.logViewer = newValue
        }
    }
    
    public var logCollector: LogCollector? {
        get {
            return feedbackViewController.logCollector
        }
        set {
            feedbackViewController.logCollector = newValue
        }
    }
    
    // MARK: - FeedbackCollector
    
    public var editor: Editor? {
        get {
            return feedbackViewController.editor
        }
        set {
            feedbackViewController.editor = newValue
        }
    }
    
    public var feedbackConfiguration: FeedbackConfiguration? {
        get {
            return feedbackViewController.feedbackConfiguration
        }
        set {
            feedbackViewController.feedbackConfiguration = newValue
        }
    }
    
    public var feedbackDelegate: FeedbackCollectorDelegate? {
        get {
            return feedbackViewController.feedbackDelegate
        }
        set {
            feedbackViewController.feedbackDelegate = newValue
        }
    }
    
    // MARK: - FeedbackNavigationController

    /// The root view controller used to collect feedback.
    let feedbackViewController: FeedbackViewController
    
    override init(navigationBarClass: AnyClass?, toolbarClass: AnyClass?) {
        feedbackViewController = FeedbackViewController()
        
        super.init(navigationBarClass: navigationBarClass, toolbarClass: toolbarClass)
     
        commonInitialization()
    }
    
    public convenience init() {
        self.init(navigationBarClass: nil, toolbarClass: nil)
    }
    
    @available(*, unavailable)
    override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
        feedbackViewController = FeedbackViewController()
        
        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    }
    
    @available(*, unavailable)
    override init(rootViewController: UIViewController) {
        fatalError("init(rootViewController:) is not supported. Use init() or init(navigationBarClass:, toolbarClass:)")
    }

    @available(*, unavailable)
    required public init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    // MARK: - FeedbackNavigationController
    
    private func commonInitialization() {
        viewControllers = [feedbackViewController]
    }
{'fraction_non_alphanumeric': 0.07159976033553025, 'fraction_numerical': 0.0026962252846015576, 'mean_word_length': 2.345190380761523, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2770837', 'n_tokens_mistral': 1747, 'n_tokens_neox': 1603, 'n_words': 381}