Completed
Push — master ( 7f632f...9d3d10 )
by Christian
06:24
created
src/MWSClient.php 1 patch
Spacing   +14 added lines, -14 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)
@@ -116,11 +116,11 @@  discard block
 block discarded – undo
116 116
 
117 117
     public function getDomain()
118 118
     {
119
-        $mainMarketPlace = $this->marketPlaces[0];
119
+        $mainMarketPlace = $this->marketPlaces[ 0 ];
120 120
         if ($mainMarketPlace) {
121
-            $marketPlaceId = $this->countries[$mainMarketPlace];
121
+            $marketPlaceId = $this->countries[ $mainMarketPlace ];
122 122
 
123
-            return $this->marketplaceIds[$marketPlaceId];
123
+            return $this->marketplaceIds[ $marketPlaceId ];
124 124
         }
125 125
 
126 126
         throw new CountryIsMissingException();
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         return $this->marketplaceIds;
148 148
     }
149 149
 
150
-    public function post($action, $path, $version, $params = [])
150
+    public function post($action, $path, $version, $params = [ ])
151 151
     {
152 152
         $headers = [
153 153
             'Accept' => 'application/xml',
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         return json_decode($json, true);
168 168
     }
169 169
 
170
-    public function getDefaultQueryParams($action, $version, $params = [])
170
+    public function getDefaultQueryParams($action, $version, $params = [ ])
171 171
     {
172 172
         $queryParameters = [
173 173
             'Action' => $action,
@@ -187,21 +187,21 @@  discard block
 block discarded – undo
187 187
 
188 188
     public function getMarketPlaceParams()
189 189
     {
190
-        $params = [];
190
+        $params = [ ];
191 191
         foreach ($this->marketPlaces as $index => $marketPlace) {
192 192
             $keyName = 'MarketplaceId.Id.'.($index + 1);
193
-            $params[$keyName] = $this->countries[$marketPlace];
193
+            $params[ $keyName ] = $this->countries[ $marketPlace ];
194 194
         }
195 195
 
196 196
         return $params;
197 197
     }
198 198
 
199
-    public function generateRequestUri($action, $version, $params = [])
199
+    public function generateRequestUri($action, $version, $params = [ ])
200 200
     {
201 201
         return http_build_query($this->getDefaultQueryParams($action, $version, $params), null, '&', PHP_QUERY_RFC3986);
202 202
     }
203 203
 
204
-    public function getQueryStringForSignature($path, $action, $version, $params = [])
204
+    public function getQueryStringForSignature($path, $action, $version, $params = [ ])
205 205
     {
206 206
         return  'POST'
207 207
                     ."\n"
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                     .$this->generateRequestUri($action, $version, $params);
213 213
     }
214 214
 
215
-    public function generateSignature($path, $action, $version, $params = [])
215
+    public function generateSignature($path, $action, $version, $params = [ ])
216 216
     {
217 217
         $signature = base64_encode(
218 218
             hash_hmac(
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
         return $signature;
227 227
     }
228 228
 
229
-    public function getQuery($path, $action, $version, $params = [])
229
+    public function getQuery($path, $action, $version, $params = [ ])
230 230
     {
231 231
         $queryParameters = $this->getDefaultQueryParams($action, $version, $params);
232
-        $queryParameters['Signature'] = $this->generateSignature($path, $action, $version, $params);
232
+        $queryParameters[ 'Signature' ] = $this->generateSignature($path, $action, $version, $params);
233 233
 
234 234
         return $queryParameters;
235 235
     }
Please login to merge, or discard this patch.