     }
 
     //MARK: - stub
+    
+    /// Creates a stub on first call. After calling this function stub **will always be used** as a prioritized way to get the function result at *handle(TArgs) -> TReturn*.
+    ///
+    /// - Returns: A stub
     public func whenCalled() -> Stub<TArgs, TReturn> {
         if let stub = stub {
             return stub

    }
    
    //MARK: - reset
    public func reset() {
        callHistory.removeAll()
        stub = nil

    }

    //MARK: - verify
    
    /// Checks whether function call times count is approriate according to the rule.
    ///
    /// - Parameter rule: A rule to be verified.
    /// - Returns: True if everything is ok. This return value is unnecessery but without it
    /// - Throws: CallTimesRuleIsBroken error if the rule was broken
    @discardableResult
    public func verify(called rule: CallTimesRule) throws -> Bool {
        try rule.verify(callTimesCount())
        return true
    }
    
    fileprivate func callTimesCount() -> Int {
        return callHistory.count
    }
    
    //MARK: - args
    
    /// Gets args of last call
    ///
    /// - Returns: Args of last call
    public func args() -> TArgs? {
        return args(callTime: callTimesCount() - 1)
    }
    
    /// Gets args of given callTime
    ///
    /// - Parameter callTime: An index of call
    /// - Returns: Args of call. Will return **nil** if function was called less times then *callTime*.
    public func args(callTime: Int) -> TArgs? {
        guard callTime > -1,
            callTime < callTimesCount() else { return nil }
