<commit_before>//
//  LoginService.swift
//  Photostream
//
//  Created by <NAME> on 04/08/2016.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation
import FirebaseAuth

typealias LoginServiceResultCallback = (User?, NSError?) -> Void

class LoginService: AnyObject {

    var source: LoginServiceSource!

    init(source: LoginServiceSource!) {
        self.source = source
    }

    func login(email: String!, password: String!, callback: LoginServiceResultCallback!) {
        source.login(email, password: password, callback: callback)<commit_msg>Let the service implements it's own callback.<commit_after>//
//  LoginService.swift
//  Photostream
//
//  Created by <NAME> on 04/08/2016.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation

typealias LoginServiceResultCallback = (User?, NSError?) -> Void

class LoginService: AnyObject {

    var source: LoginServiceSource!

    init(source: LoginServiceSource!) {
        self.source = source
    }

    func login(email: String!, password: String!, callback: LoginServiceResultCallback!) {
        source.login(email, password: password) { (user, error) in
            callback(user, error)
        }
{'fraction_non_alphanumeric': 0.11676396997497915, 'fraction_numerical': 0.020016680567139282, 'mean_word_length': 3.332129963898917, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '5704714', 'n_tokens_mistral': 366, 'n_tokens_neox': 327, 'n_words': 98}