<commit_before>//
//  DataController.swift
//  AfuRo
//
//  Created by <NAME> on 2017/11/27.
//  Copyright © 2017年 Ryukyu. All rights reserved.
//

import Foundation

class DataController{
    let defaults = UserDefaults.standard
    
    
    
    func getTotalStepsData() -> Int{
        let steps = defaults.integer(forKey: "totalSteps")
        return steps
        
    }
    
    func setTotalStepsData(_ steps:Int){
        defaults.set(steps, forKey: "totalSteps")
        
    }
    
    func getLastDateData() -> Date{
        let lastDate = defaults.object(forKey: "yourKey") as! Date
        return lastDate
    }
    
    
    func setLastDateData(_ lastDate:Date){
        defaults.set(lastDate, forKey: "lastDate")

    }
        
}
<commit_msg>fix DataController<commit_after>//
//  DataController.swift
//  AfuRo
//
//  Created by <NAME> on 2017/11/27.
//  Copyright © 2017年 Ryukyu. All rights reserved.
//

import Foundation

class DataController{
    let defaults = UserDefaults.standard
    
    func getTotalStepsData() -> Int{
        let steps = defaults.integer(forKey: "totalSteps")
        return steps
    }
    
    func setTotalStepsData(_ steps:Int){
        
        defaults.set(steps, forKey: "totalSteps")
        
    }
    
    func getLastDateData() -> Date{
        
        guard
            let lastDate = defaults.object(forKey: "lastDate")
            else{ return Date() }
        return lastDate as! Date
        
    }
    
    func setLastDateData(_ lastDate:Date){
        
        defaults.set(lastDate, forKey: "lastDate")
        
    }
}

{'fraction_non_alphanumeric': 0.10446821900566394, 'fraction_numerical': 0.015103838892385148, 'mean_word_length': 1.933579335793358, 'pattern_counts': {'":': 0, '<': 5, '<?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': '958161', 'n_tokens_mistral': 515, 'n_tokens_neox': 487, 'n_words': 113}