2
0
Эх сурвалжийг харах

Removed unnecessary parentheses from closure parameters and typealiases.

Christian Noon 10 жил өмнө
parent
commit
b865e1cb79

+ 3 - 3
Source/Download.swift

@@ -44,7 +44,7 @@ extension Manager {
 
         let request = Request(session: session, task: downloadTask)
         if let downloadDelegate = request.delegate as? Request.DownloadTaskDelegate {
-            downloadDelegate.downloadTaskDidFinishDownloadingToURL = { (session, downloadTask, URL) in
+            downloadDelegate.downloadTaskDidFinishDownloadingToURL = { session, downloadTask, URL in
                 return destination(URL, downloadTask.response as! NSHTTPURLResponse)
             }
         }
@@ -109,7 +109,7 @@ extension Request {
     /**
         A closure executed once a request has successfully completed in order to determine where to move the temporary file written to during the download process. The closure takes two arguments: the temporary file URL and the URL response, and returns a single argument: the file URL where the temporary file should be moved.
     */
-    public typealias DownloadFileDestination = (NSURL, NSHTTPURLResponse) -> (NSURL)
+    public typealias DownloadFileDestination = (NSURL, NSHTTPURLResponse) -> NSURL
 
     /**
         Creates a download file destination closure which uses the default file manager to move the temporary file to a file URL in the first available directory with the specified search path directory and search path domain mask.
@@ -143,7 +143,7 @@ extension Request {
 
         // MARK: Override Closures
 
-        var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> (NSURL))?
+        var downloadTaskDidFinishDownloadingToURL: ((NSURLSession, NSURLSessionDownloadTask, NSURL) -> NSURL)?
         var downloadTaskDidWriteData: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64, Int64) -> Void)?
         var downloadTaskDidResumeAtOffset: ((NSURLSession, NSURLSessionDownloadTask, Int64, Int64) -> Void)?
 

+ 4 - 4
Source/Manager.swift

@@ -222,13 +222,13 @@ public class Manager {
         // MARK: Override Closures
 
         /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:`.
-        public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> (NSURLRequest?))?
+        public var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)?
 
         /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didReceiveChallenge:completionHandler:`.
         public var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential!))?
 
         /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:session:task:needNewBodyStream:`.
-        public var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> (NSInputStream!))?
+        public var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream!)?
 
         /// Overrides default behavior for NSURLSessionTaskDelegate method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`.
         public var taskDidSendBodyData: ((NSURLSession, NSURLSessionTask, Int64, Int64, Int64) -> Void)?
@@ -289,7 +289,7 @@ public class Manager {
         // MARK: Override Closures
 
         /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didReceiveResponse:completionHandler:`.
-        public var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> (NSURLSessionResponseDisposition))?
+        public var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)?
 
         /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:didBecomeDownloadTask:`.
         public var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)?
@@ -298,7 +298,7 @@ public class Manager {
         public var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)?
 
         /// Overrides default behavior for NSURLSessionDataDelegate method `URLSession:dataTask:willCacheResponse:completionHandler:`.
-        public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> (NSCachedURLResponse!))?
+        public var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse!)?
 
         // MARK: Delegate Methods
 

+ 5 - 5
Source/Request.swift

@@ -129,7 +129,7 @@ public class Request {
         :returns: A data response serializer.
     */
     public class func responseDataSerializer() -> Serializer {
-        return { (request, response, data) in
+        return { request, response, data in
             return (data, nil)
         }
     }
@@ -234,9 +234,9 @@ public class Request {
 
         // MARK: Override Closures
 
-        var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> (NSURLRequest?))?
+        var taskWillPerformHTTPRedirection: ((NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest) -> NSURLRequest?)?
         var taskDidReceiveChallenge: ((NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential?))?
-        var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> (NSInputStream?))?
+        var taskNeedNewBodyStream: ((NSURLSession, NSURLSessionTask) -> NSInputStream?)?
         var taskDidCompleteWithError: ((NSURLSession, NSURLSessionTask, NSError?) -> Void)?
 
         // MARK: Delegate Methods
@@ -319,10 +319,10 @@ public class Request {
 
         // MARK: Override Closures
 
-        var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> (NSURLSessionResponseDisposition))?
+        var dataTaskDidReceiveResponse: ((NSURLSession, NSURLSessionDataTask, NSURLResponse) -> NSURLSessionResponseDisposition)?
         var dataTaskDidBecomeDownloadTask: ((NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) -> Void)?
         var dataTaskDidReceiveData: ((NSURLSession, NSURLSessionDataTask, NSData) -> Void)?
-        var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> (NSCachedURLResponse?))?
+        var dataTaskWillCacheResponse: ((NSURLSession, NSURLSessionDataTask, NSCachedURLResponse) -> NSCachedURLResponse?)?
 
         // MARK: Delegate Methods
 

+ 5 - 5
Source/ResponseSerialization.swift

@@ -33,7 +33,7 @@ extension Request {
         :returns: A string response serializer.
     */
     public class func stringResponseSerializer(var encoding: NSStringEncoding? = nil) -> Serializer {
-        return { (_, response, data) in
+        return { _, response, data in
             if data == nil || data?.length == 0 {
                 return (nil, nil)
             }
@@ -76,7 +76,7 @@ extension Request {
         :returns: A JSON object response serializer.
     */
     public class func JSONResponseSerializer(options: NSJSONReadingOptions = .AllowFragments) -> Serializer {
-        return { (request, response, data) in
+        return { request, response, data in
             if data == nil || data?.length == 0 {
                 return (nil, nil)
             }
@@ -97,7 +97,7 @@ extension Request {
         :returns: The request.
     */
     public func responseJSON(options: NSJSONReadingOptions = .AllowFragments, completionHandler: (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) -> Self {
-        return response(serializer: Request.JSONResponseSerializer(options: options), completionHandler: { (request, response, JSON, error) in
+        return response(serializer: Request.JSONResponseSerializer(options: options), completionHandler: { request, response, JSON, error in
             completionHandler(request, response, JSON, error)
         })
     }
@@ -114,7 +114,7 @@ extension Request {
         :returns: A property list object response serializer.
     */
     public class func propertyListResponseSerializer(options: NSPropertyListReadOptions = 0) -> Serializer {
-        return { (request, response, data) in
+        return { request, response, data in
             if data == nil || data?.length == 0 {
                 return (nil, nil)
             }
@@ -135,7 +135,7 @@ extension Request {
         :returns: The request.
     */
     public func responsePropertyList(options: NSPropertyListReadOptions = 0, completionHandler: (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) -> Self {
-        return response(serializer: Request.propertyListResponseSerializer(options: options), completionHandler: { (request, response, plist, error) in
+        return response(serializer: Request.propertyListResponseSerializer(options: options), completionHandler: { request, response, plist, error in
             completionHandler(request, response, plist, error)
         })
     }

+ 3 - 3
Source/Validation.swift

@@ -27,7 +27,7 @@ extension Request {
     /**
         A closure used to validate a request that takes a URL request and URL response, and returns whether the request was valid.
     */
-    public typealias Validation = (NSURLRequest, NSHTTPURLResponse) -> (Bool)
+    public typealias Validation = (NSURLRequest, NSHTTPURLResponse) -> Bool
 
     /**
         Validates the request, using the specified closure.
@@ -62,7 +62,7 @@ extension Request {
         :returns: The request.
     */
     public func validate<S : SequenceType where S.Generator.Element == Int>(statusCode acceptableStatusCode: S) -> Self {
-        return validate { (_, response) in
+        return validate { _, response in
             return contains(acceptableStatusCode, response.statusCode)
         }
     }
@@ -106,7 +106,7 @@ extension Request {
         :returns: The request.
     */
     public func validate<S : SequenceType where S.Generator.Element == String>(contentType acceptableContentTypes: S) -> Self {
-        return validate {(_, response) in
+        return validate { _, response in
             if let responseContentType = response.MIMEType,
                 responseMIMEType = MIMEType(responseContentType)
             {

+ 6 - 6
Tests/AuthenticationTests.swift

@@ -34,7 +34,7 @@ class AlamofireAuthenticationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .authenticate(user: "invalid", password: "credentials")
-            .response { (request, response, _, error) in
+            .response { request, response, _, error in
                 XCTAssertNotNil(request, "request should not be nil")
                 XCTAssertNil(response, "response should be nil")
                 XCTAssertNotNil(error, "error should not be nil")
@@ -47,7 +47,7 @@ class AlamofireAuthenticationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .authenticate(user: user, password: password)
-            .response { (request, response, _, error) in
+            .response { request, response, _, error in
                 XCTAssertNotNil(request, "request should not be nil")
                 XCTAssertNotNil(response, "response should not be nil")
                 XCTAssert(response?.statusCode == 200, "response status code should be 200")
@@ -56,7 +56,7 @@ class AlamofireAuthenticationTestCase: XCTestCase {
                 validCredentialsExpectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -71,7 +71,7 @@ class AlamofireAuthenticationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .authenticate(user: "invalid", password: "credentials")
-            .response { (request, response, _, error) in
+            .response { request, response, _, error in
                 XCTAssertNotNil(request, "request should not be nil")
                 XCTAssertNil(response, "response should be nil")
                 XCTAssertNotNil(error, "error should not be nil")
@@ -84,7 +84,7 @@ class AlamofireAuthenticationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .authenticate(user: user, password: password)
-            .response { (request, response, _, error) in
+            .response { request, response, _, error in
                 XCTAssertNotNil(request, "request should not be nil")
                 XCTAssertNotNil(response, "response should not be nil")
                 XCTAssert(response?.statusCode == 200, "response status code should be 200")
@@ -93,7 +93,7 @@ class AlamofireAuthenticationTestCase: XCTestCase {
                 validCredentialsExpectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }

+ 3 - 3
Tests/DownloadTests.swift

@@ -76,7 +76,7 @@ class AlamofireDownloadResponseTestCase: XCTestCase {
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -90,7 +90,7 @@ class AlamofireDownloadResponseTestCase: XCTestCase {
         let destination = Alamofire.Request.suggestedDownloadDestination(directory: searchPathDirectory, domain: searchPathDomain)
 
         let download = Alamofire.download(.GET, URL, destination)
-        download.progress { (bytesRead, totalBytesRead, totalBytesExpectedToRead) -> Void in
+        download.progress { bytesRead, totalBytesRead, totalBytesExpectedToRead in
             XCTAssert(bytesRead > 0, "bytesRead should be > 0")
             XCTAssert(totalBytesRead > 0, "totalBytesRead should be > 0")
             XCTAssert(totalBytesExpectedToRead == -1, "totalBytesExpectedToRead should be -1")
@@ -100,7 +100,7 @@ class AlamofireDownloadResponseTestCase: XCTestCase {
             expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }

+ 2 - 2
Tests/ManagerTests.swift

@@ -35,10 +35,10 @@ class AlamofireManagerTestCase: XCTestCase {
         let expectation = expectationWithDescription("\(URL)")
 
         manager.request(URLRequest)
-            .response { (_,_,_,_) in expectation.fulfill() }
+            .response { _, _, _, _ in expectation.fulfill() }
             .resume()
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }

+ 1 - 1
Tests/ParameterEncodingTests.swift

@@ -339,7 +339,7 @@ class AlamofirePropertyListParameterEncodingTestCase: XCTestCase {
 
 class AlamofireCustomParameterEncodingTestCase: XCTestCase {
     func testCustomParameterEncode() {
-        let encodingClosure: (URLRequestConvertible, [String: AnyObject]?) -> (NSURLRequest, NSError?) = { (URLRequest, parameters) in
+        let encodingClosure: (URLRequestConvertible, [String: AnyObject]?) -> (NSURLRequest, NSError?) = { URLRequest, parameters in
             let mutableURLRequest = URLRequest.URLRequest.mutableCopy() as! NSMutableURLRequest
             mutableURLRequest.setValue("Xcode", forHTTPHeaderField: "User-Agent")
             return (mutableURLRequest, nil)

+ 3 - 3
Tests/RequestTests.swift

@@ -62,7 +62,7 @@ class AlamofireRequestResponseTestCase: XCTestCase {
                     expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -77,13 +77,13 @@ class AlamofireRequestDescriptionTestCase: XCTestCase {
 
         let expectation = expectationWithDescription("\(URL)")
 
-        request.response { (_, response,_,_) in
+        request.response { _, response, _, _ in
             XCTAssertEqual(request.description, "GET http://httpbin.org/get (\(response!.statusCode))", "incorrect request description")
 
             expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }

+ 7 - 7
Tests/ResponseTests.swift

@@ -30,7 +30,7 @@ class AlamofireJSONResponseTestCase: XCTestCase {
         let expectation = expectationWithDescription("\(URL)")
 
         Alamofire.request(.GET, URL, parameters: ["foo": "bar"])
-                 .responseJSON { (request, response, JSON, error) in
+                 .responseJSON { request, response, JSON, error in
                     XCTAssertNotNil(request, "request should not be nil")
                     XCTAssertNotNil(response, "response should not be nil")
                     XCTAssertNotNil(JSON, "JSON should not be nil")
@@ -41,7 +41,7 @@ class AlamofireJSONResponseTestCase: XCTestCase {
                     expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -51,7 +51,7 @@ class AlamofireJSONResponseTestCase: XCTestCase {
         let expectation = expectationWithDescription("\(URL)")
 
         Alamofire.request(.POST, URL, parameters: ["foo": "bar"])
-            .responseJSON { (request, response, JSON, error) in
+            .responseJSON { request, response, JSON, error in
                 XCTAssertNotNil(request, "request should not be nil")
                 XCTAssertNotNil(response, "response should not be nil")
                 XCTAssertNotNil(JSON, "JSON should not be nil")
@@ -62,7 +62,7 @@ class AlamofireJSONResponseTestCase: XCTestCase {
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -81,7 +81,7 @@ class AlamofireRedirectResponseTestCase: XCTestCase {
         }
 
         Alamofire.request(.GET, URL)
-            .response { (request, response, data, error) in
+            .response { request, response, data, error in
                 XCTAssertNotNil(request, "request should not be nil")
                 XCTAssertNotNil(response, "response should not be nil")
                 XCTAssertNotNil(data, "data should not be nil")
@@ -93,7 +93,7 @@ class AlamofireRedirectResponseTestCase: XCTestCase {
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -124,7 +124,7 @@ class AlamofireRedirectResponseTestCase: XCTestCase {
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }

+ 2 - 2
Tests/TLSEvaluationTests.swift

@@ -31,14 +31,14 @@ class AlamofireTLSEvaluationTestCase: XCTestCase {
         let expectation = expectationWithDescription("\(URL)")
 
         Alamofire.request(.GET, URL)
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNotNil(error, "error should not be nil")
                 XCTAssert(error?.code == NSURLErrorServerCertificateUntrusted, "error should be NSURLErrorServerCertificateUntrusted")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }

+ 4 - 4
Tests/UploadTests.swift

@@ -32,7 +32,7 @@ class UploadResponseTestCase: XCTestCase {
         let expectation = expectationWithDescription(URL)
 
         Alamofire.upload(.POST, URL, data!)
-                 .response { (request, response, _, error) in
+                 .response { request, response, _, error in
                     XCTAssertNotNil(request, "request should not be nil")
                     XCTAssertNotNil(response, "response should not be nil")
                     XCTAssertNil(error, "error should be nil")
@@ -40,7 +40,7 @@ class UploadResponseTestCase: XCTestCase {
                     expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -52,7 +52,7 @@ class UploadResponseTestCase: XCTestCase {
         let expectation = expectationWithDescription(URL)
 
         let upload = Alamofire.upload(.POST, URL, data!)
-        upload.progress { (bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) -> Void in
+        upload.progress { bytesWritten, totalBytesWritten, totalBytesExpectedToWrite in
             XCTAssert(bytesWritten > 0, "bytesWritten should be > 0")
             XCTAssert(totalBytesWritten > 0, "totalBytesWritten should be > 0")
             XCTAssert(totalBytesExpectedToWrite > 0, "totalBytesExpectedToWrite should be > 0")
@@ -62,7 +62,7 @@ class UploadResponseTestCase: XCTestCase {
             expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }

+ 28 - 28
Tests/ValidationTests.swift

@@ -32,13 +32,13 @@ class AlamofireStatusCodeValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate(statusCode: 200..<300)
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
             }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -50,14 +50,14 @@ class AlamofireStatusCodeValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate(statusCode: [200])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNotNil(error, "error should not be nil")
                 XCTAssertEqual(error!.domain, AlamofireErrorDomain, "error should be in Alamofire error domain")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -69,14 +69,14 @@ class AlamofireStatusCodeValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate(statusCode: [])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNotNil(error, "error should not be nil")
                 XCTAssertEqual(error!.domain, AlamofireErrorDomain, "error should be in Alamofire error domain")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -90,13 +90,13 @@ class AlamofireContentTypeValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate(contentType: ["application/json"])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -110,13 +110,13 @@ class AlamofireContentTypeValidationTestCase: XCTestCase {
             .validate(contentType: ["*/*"])
             .validate(contentType: ["application/*"])
             .validate(contentType: ["*/json"])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -128,14 +128,14 @@ class AlamofireContentTypeValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate(contentType: ["application/octet-stream"])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNotNil(error, "error should not be nil")
                 XCTAssertEqual(error!.domain, AlamofireErrorDomain, "error should be in Alamofire error domain")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -147,14 +147,14 @@ class AlamofireContentTypeValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate(contentType: [])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNotNil(error, "error should not be nil")
                 XCTAssertEqual(error!.domain, AlamofireErrorDomain, "error should be in Alamofire error domain")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -169,13 +169,13 @@ class AlamofireMultipleValidationTestCase: XCTestCase {
         Alamofire.request(.GET, URL)
             .validate(statusCode: 200..<300)
             .validate(contentType: ["application/json"])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -188,14 +188,14 @@ class AlamofireMultipleValidationTestCase: XCTestCase {
         Alamofire.request(.GET, URL)
             .validate(statusCode: 400..<600)
             .validate(contentType: ["application/octet-stream"])
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNotNil(error, "error should not be nil")
                 XCTAssertEqual(error!.domain, AlamofireErrorDomain, "error should be in Alamofire error domain")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -211,13 +211,13 @@ class AlamofireAutomaticValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate()
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -229,14 +229,14 @@ class AlamofireAutomaticValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate()
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNotNil(error, "error should not be nil")
                 XCTAssertEqual(error!.domain, AlamofireErrorDomain, "error should be in Alamofire error domain")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -251,13 +251,13 @@ class AlamofireAutomaticValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate()
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -271,13 +271,13 @@ class AlamofireAutomaticValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate()
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }
@@ -291,13 +291,13 @@ class AlamofireAutomaticValidationTestCase: XCTestCase {
 
         Alamofire.request(.GET, URL)
             .validate()
-            .response { (_, _, _, error) in
+            .response { _, _, _, error in
                 XCTAssertNil(error, "error should be nil")
 
                 expectation.fulfill()
         }
 
-        waitForExpectationsWithTimeout(10) { (error) in
+        waitForExpectationsWithTimeout(10) { error in
             XCTAssertNil(error, "\(error)")
         }
     }