Completed
Push — master ( 3d5f0e...20fe80 )
by Christian
27s queued 10s
created
src/MWSClient.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $this->sellerId = config('amazon-mws.seller_id');
71 71
         $this->mwsAuthToken = config('amazon-mws.mws_auth_token') ?: null;
72 72
         $this->marketPlaces = explode(',', config('amazon-mws.default_market_place') ?: 'DE');
73
-        $this->client = $client ?: new Client(['timeout'  => 60]);
73
+        $this->client = $client ?: new Client([ 'timeout'  => 60 ]);
74 74
     }
75 75
 
76 76
     public function setMarketPlaces($countryCodes)
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
 
131 131
     public function getDomain()
132 132
     {
133
-        $mainMarketPlace = $this->marketPlaces[0];
133
+        $mainMarketPlace = $this->marketPlaces[ 0 ];
134 134
         if ($mainMarketPlace) {
135
-            $marketPlaceId = $this->countries[$mainMarketPlace];
135
+            $marketPlaceId = $this->countries[ $mainMarketPlace ];
136 136
 
137
-            return $this->marketplaceIds[$marketPlaceId];
137
+            return $this->marketplaceIds[ $marketPlaceId ];
138 138
         }
139 139
 
140 140
         throw new CountryIsMissingException();
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         return $this->marketplaceIds;
162 162
     }
163 163
 
164
-    public function post($action, $path, $version, $params = [], $body = null)
164
+    public function post($action, $path, $version, $params = [ ], $body = null)
165 165
     {
166 166
         $headers = [
167 167
             'Accept' => 'application/xml',
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         ];
170 170
 
171 171
         if ($action === 'SubmitFeed') {
172
-            $headers['Content-Type'] = 'text/xml; charset=iso-8859-1';
172
+            $headers[ 'Content-Type' ] = 'text/xml; charset=iso-8859-1';
173 173
         }
174 174
 
175 175
         $requestOptions = [
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         return json_decode($json, true);
187 187
     }
188 188
 
189
-    public function getDefaultQueryParams($action, $version, $params = [])
189
+    public function getDefaultQueryParams($action, $version, $params = [ ])
190 190
     {
191 191
         $queryParameters = [
192 192
             'Action' => $action,
@@ -207,21 +207,21 @@  discard block
 block discarded – undo
207 207
 
208 208
     public function getMarketPlaceParams()
209 209
     {
210
-        $params = [];
210
+        $params = [ ];
211 211
         foreach ($this->marketPlaces as $index => $marketPlace) {
212 212
             $keyName = 'MarketplaceId.Id.'.($index + 1);
213
-            $params[$keyName] = $this->countries[$marketPlace];
213
+            $params[ $keyName ] = $this->countries[ $marketPlace ];
214 214
         }
215 215
 
216 216
         return $params;
217 217
     }
218 218
 
219
-    public function generateRequestUri($action, $version, $params = [])
219
+    public function generateRequestUri($action, $version, $params = [ ])
220 220
     {
221 221
         return http_build_query($this->getDefaultQueryParams($action, $version, $params), null, '&', PHP_QUERY_RFC3986);
222 222
     }
223 223
 
224
-    public function getQueryStringForSignature($path, $action, $version, $params = [])
224
+    public function getQueryStringForSignature($path, $action, $version, $params = [ ])
225 225
     {
226 226
         return  'POST'
227 227
                     ."\n"
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
                     .$this->generateRequestUri($action, $version, $params);
233 233
     }
234 234
 
235
-    public function generateSignature($path, $action, $version, $params = [])
235
+    public function generateSignature($path, $action, $version, $params = [ ])
236 236
     {
237 237
         $signature = base64_encode(
238 238
             hash_hmac(
@@ -246,10 +246,10 @@  discard block
 block discarded – undo
246 246
         return $signature;
247 247
     }
248 248
 
249
-    public function getQuery($path, $action, $version, $params = [])
249
+    public function getQuery($path, $action, $version, $params = [ ])
250 250
     {
251 251
         $queryParameters = $this->getDefaultQueryParams($action, $version, $params);
252
-        $queryParameters['Signature'] = $this->generateSignature($path, $action, $version, $params);
252
+        $queryParameters[ 'Signature' ] = $this->generateSignature($path, $action, $version, $params);
253 253
 
254 254
         return $queryParameters;
255 255
     }
Please login to merge, or discard this patch.