Browse Source

Unified all multi-line dictionary formatting.

Christian Noon 10 years ago
parent
commit
27f964709e
2 changed files with 11 additions and 7 deletions
  1. 4 2
      Source/Manager.swift
  2. 7 5
      Tests/ParameterEncodingTests.swift

+ 4 - 2
Source/Manager.swift

@@ -80,9 +80,11 @@ public class Manager {
             return "Alamofire"
         }()
 
-        return ["Accept-Encoding": acceptEncoding,
+        return [
+            "Accept-Encoding": acceptEncoding,
             "Accept-Language": acceptLanguage,
-            "User-Agent": userAgent]
+            "User-Agent": userAgent
+        ]
     }()
 
     let queue = dispatch_queue_create(nil, DISPATCH_QUEUE_SERIAL)

+ 7 - 5
Tests/ParameterEncodingTests.swift

@@ -248,10 +248,11 @@ class AlamofireJSONParameterEncodingTestCase: XCTestCase {
         let parameters = [
             "foo": "bar",
             "baz": ["a", 1, true],
-            "qux": ["a": 1,
-                    "b": [2, 2],
-                    "c": [3, 3, 3]
-                   ]
+            "qux": [
+                "a": 1,
+                "b": [2, 2],
+                "c": [3, 3, 3]
+            ]
         ]
 
         let (URLRequest, error) = self.encoding.encode(self.URLRequest, parameters: parameters)
@@ -294,7 +295,8 @@ class AlamofirePropertyListParameterEncodingTestCase: XCTestCase {
         let parameters = [
             "foo": "bar",
             "baz": ["a", 1, true],
-            "qux": ["a": 1,
+            "qux": [
+                "a": 1,
                 "b": [2, 2],
                 "c": [3, 3, 3]
             ]