func applyParamTemplate()

in Sources/MockoloFramework/Templates/ParamTemplate.swift [20:36]


    func applyParamTemplate(name: String,
                            label: String,
                            type: Type,
                            inInit: Bool) -> String {
        var result = name
        if !label.isEmpty {
            result = "\(label) \(name)"
        }
        if !type.isUnknown {
            result = "\(result): \(type.typeName)"
        }
        
        if inInit, let defaultVal = type.defaultVal() {
            result = "\(result) = \(defaultVal)"
        }
        return result
    }