<commit_before>//
//  UIViewController+Extensions.swift
//  Utilities
//
//  Created by <NAME> on 8/21/19.
//  Copyright © 2019 <NAME>. All rights reserved.
//

import UIKit

extension UIViewController {
    public class func instantiate<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) -> T {
        let storyboard = UIStoryboard(name: "\(T.self)", bundle: nil)

        return storyboard.instantiateInitialViewController(creator: viewController)!
    }

    public func show<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) {
        let viewController = T.instantiate(viewController)
        show(viewController, sender: nil)
    }

    public func showDetail<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) {
        let viewController = T.instantiate(viewController)

        let navigationController = UINavigationController(rootViewController: viewController)
        navigationController.navigationBar.barStyle = .black

        showDetailViewController(navigationController, sender: nil)
    }

    public func present<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) {
        let viewController = T.instantiate(viewController)

        let navigationController = UINavigationController(rootViewController: viewController)
        navigationController.navigationBar.barStyle = .black

        present(navigationController, animated: true)
    }
}<commit_msg>Change modal presentation to form sheet<commit_after>//
//  UIViewController+Extensions.swift
//  Utilities
//
//  Created by <NAME> on 8/21/19.
//  Copyright © 2019 <NAME>. All rights reserved.
//

import UIKit

extension UIViewController {
    public class func instantiate<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) -> T {
        let storyboard = UIStoryboard(name: "\(T.self)", bundle: nil)

        return storyboard.instantiateInitialViewController(creator: viewController)!
    }

    public func show<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) {
        let viewController = T.instantiate(viewController)
        show(viewController, sender: nil)
    }

    public func showDetail<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) {
        let viewController = T.instantiate(viewController)

        let navigationController = UINavigationController(rootViewController: viewController)
        navigationController.navigationBar.barStyle = .black

        showDetailViewController(navigationController, sender: nil)
    }

    public func present<T: UIViewController>(_ viewController: @escaping (NSCoder) -> T?) {
        let viewController = T.instantiate(viewController)

        let navigationController = UINavigationController(rootViewController: viewController)
        navigationController.navigationBar.barStyle = .black
        navigationController.modalPresentationStyle = .formSheet

        present(navigationController, animated: true)
    }
}
{'fraction_non_alphanumeric': 0.09942703067071115, 'fraction_numerical': 0.006066734074823054, 'mean_word_length': 3.8103727714748783, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, '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': '530992', 'n_tokens_mistral': 835, 'n_tokens_neox': 759, 'n_words': 191}