Completed
Push — master ( fb89e6...384431 )
by Christian
08:38 queued 11s
created
src/MWSClient.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         $this->accessKeyId = config('amazon-mws.access_key_id');
66 66
         $this->secretKey = config('amazon-mws.secret_key');
67 67
         $this->sellerId = config('amazon-mws.seller_id');
68
-        $this->marketPlaces = ['DE'];
69
-        $this->client = $client ?: new Client(['timeout'  => 60]);
68
+        $this->marketPlaces = [ 'DE' ];
69
+        $this->client = $client ?: new Client([ 'timeout'  => 60 ]);
70 70
     }
71 71
 
72 72
     public function setMarketPlaces($countryCodes)
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 
122 122
     public function getDomain()
123 123
     {
124
-        $mainMarketPlace = $this->marketPlaces[0];
124
+        $mainMarketPlace = $this->marketPlaces[ 0 ];
125 125
         if ($mainMarketPlace) {
126
-            $marketPlaceId = $this->countries[$mainMarketPlace];
127
-            return $this->marketplaceIds[$marketPlaceId];
126
+            $marketPlaceId = $this->countries[ $mainMarketPlace ];
127
+            return $this->marketplaceIds[ $marketPlaceId ];
128 128
         }
129 129
 
130 130
         throw new CountryIsMissingException();
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         return $this->marketplaceIds;
152 152
     }
153 153
 
154
-    public function post($action, $path, $version, $params = [], $body = null)
154
+    public function post($action, $path, $version, $params = [ ], $body = null)
155 155
     {
156 156
         $headers = [
157 157
             'Accept' => 'application/xml',
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         ];
160 160
 
161 161
         if ($action === 'SubmitFeed') {
162
-            $headers['Content-Type'] = 'text/xml; charset=iso-8859-1';
162
+            $headers[ 'Content-Type' ] = 'text/xml; charset=iso-8859-1';
163 163
         }
164 164
 
165 165
         $requestOptions = [
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         return json_decode($json, true);
177 177
     }
178 178
 
179
-    public function getDefaultQueryParams($action, $version, $params = [])
179
+    public function getDefaultQueryParams($action, $version, $params = [ ])
180 180
     {
181 181
         $queryParameters = [
182 182
             'Action' => $action,
@@ -196,21 +196,21 @@  discard block
 block discarded – undo
196 196
 
197 197
     public function getMarketPlaceParams()
198 198
     {
199
-        $params = [];
199
+        $params = [ ];
200 200
         foreach ($this->marketPlaces as $index => $marketPlace) {
201 201
             $keyName = 'MarketplaceId.Id.'.($index + 1);
202
-            $params[$keyName] = $this->countries[$marketPlace];
202
+            $params[ $keyName ] = $this->countries[ $marketPlace ];
203 203
         }
204 204
 
205 205
         return $params;
206 206
     }
207 207
 
208
-    public function generateRequestUri($action, $version, $params = [])
208
+    public function generateRequestUri($action, $version, $params = [ ])
209 209
     {
210 210
         return http_build_query($this->getDefaultQueryParams($action, $version, $params), null, '&', PHP_QUERY_RFC3986);
211 211
     }
212 212
 
213
-    public function getQueryStringForSignature($path, $action, $version, $params = [])
213
+    public function getQueryStringForSignature($path, $action, $version, $params = [ ])
214 214
     {
215 215
         return  'POST'
216 216
                     ."\n"
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                     .$this->generateRequestUri($action, $version, $params);
222 222
     }
223 223
 
224
-    public function generateSignature($path, $action, $version, $params = [])
224
+    public function generateSignature($path, $action, $version, $params = [ ])
225 225
     {
226 226
         $signature = base64_encode(
227 227
             hash_hmac(
@@ -235,10 +235,10 @@  discard block
 block discarded – undo
235 235
         return $signature;
236 236
     }
237 237
 
238
-    public function getQuery($path, $action, $version, $params = [])
238
+    public function getQuery($path, $action, $version, $params = [ ])
239 239
     {
240 240
         $queryParameters = $this->getDefaultQueryParams($action, $version, $params);
241
-        $queryParameters['Signature'] = $this->generateSignature($path, $action, $version, $params);
241
+        $queryParameters[ 'Signature' ] = $this->generateSignature($path, $action, $version, $params);
242 242
 
243 243
         return $queryParameters;
244 244
     }
Please login to merge, or discard this patch.