Completed
Push — master ( 1c1fd6...5cf71c )
by Christian
06:00
created
src/MWSOrders.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -40,6 +40,10 @@
 block discarded – undo
40 40
         return $this->parseResponse($response, 'ListOrderItemsResult', 'OrderItems.OrderItem');
41 41
     }
42 42
 
43
+    /**
44
+     * @param string $resultTypeName
45
+     * @param string $dataName
46
+     */
43 47
     protected function parseResponse($response, $resultTypeName, $dataName)
44 48
     {
45 49
         $requestId = data_get($response, 'ResponseMetadata.RequestId');
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
         $this->client = $client;
14 14
     }
15 15
 
16
-    public function list($params = [])
16
+    public function list($params = [ ])
17 17
     {
18 18
         //TODO
19 19
     }
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
     public function get($ids)
22 22
     {
23 23
         $ids = is_array($ids) ? $ids : func_get_args();
24
-        $params = [];
24
+        $params = [ ];
25 25
 
26 26
         foreach ($ids as $key => $id) {
27 27
             $keyName = 'AmazonOrderId.Id.'.($key + 1);
28
-            $params[$keyName] = $id;
28
+            $params[ $keyName ] = $id;
29 29
         }
30 30
 
31 31
         $response = $this->client->post('GetOrder', '/Orders/'.self::VERSION, self::VERSION, $params);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function getItems($id)
37 37
     {
38
-        $response = $this->client->post('ListOrderItems', '/Orders/' . self::VERSION, self::VERSION);
38
+        $response = $this->client->post('ListOrderItems', '/Orders/'.self::VERSION, self::VERSION);
39 39
 
40 40
         return $this->parseResponse($response, 'ListOrderItemsResult', 'OrderItems.OrderItem');
41 41
     }
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
     protected function parseResponse($response, $resultTypeName, $dataName)
44 44
     {
45 45
         $requestId = data_get($response, 'ResponseMetadata.RequestId');
46
-        $orders = data_get($response, $resultTypeName. '.' . $dataName);
47
-        $nextToken = data_get($response, $resultTypeName. '.NextToken');
46
+        $orders = data_get($response, $resultTypeName.'.'.$dataName);
47
+        $nextToken = data_get($response, $resultTypeName.'.NextToken');
48 48
         
49 49
         $data = [
50 50
             'request_id' => $requestId,
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
         ];
53 53
 
54 54
         if ($nextToken) {
55
-            $data['next_token'] = $nextToken;
55
+            $data[ 'next_token' ] = $nextToken;
56 56
         }
57 57
 
58 58
         if ($resultTypeName == 'ListOrderItemsResult') {
59
-            $data['order_id'] = data_get($response, $resultTypeName . '.AmazonOrderId');
59
+            $data[ 'order_id' ] = data_get($response, $resultTypeName.'.AmazonOrderId');
60 60
         }
61 61
 
62 62
         return $data;
Please login to merge, or discard this patch.