@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $this->sellerId = config('amazon-mws.seller_id'); |
72 | 72 | $this->mwsAuthToken = config('amazon-mws.mws_auth_token') ?: null; |
73 | 73 | $this->marketPlaces = explode(',', config('amazon-mws.default_market_place') ?: 'DE'); |
74 | - $this->client = $client ?: new Client(['timeout' => 60]); |
|
74 | + $this->client = $client ?: new Client([ 'timeout' => 60 ]); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | public function setMarketPlaces($countryCodes) |
@@ -131,11 +131,11 @@ discard block |
||
131 | 131 | |
132 | 132 | public function getDomain() |
133 | 133 | { |
134 | - $mainMarketPlace = $this->marketPlaces[0]; |
|
134 | + $mainMarketPlace = $this->marketPlaces[ 0 ]; |
|
135 | 135 | if ($mainMarketPlace) { |
136 | - $marketPlaceId = $this->countries[$mainMarketPlace]; |
|
136 | + $marketPlaceId = $this->countries[ $mainMarketPlace ]; |
|
137 | 137 | |
138 | - return $this->marketplaceIds[$marketPlaceId]; |
|
138 | + return $this->marketplaceIds[ $marketPlaceId ]; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | throw new CountryIsMissingException(); |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | return $this->marketplaceIds; |
163 | 163 | } |
164 | 164 | |
165 | - public function post($action, $path, $version, $params = [], $body = null) |
|
165 | + public function post($action, $path, $version, $params = [ ], $body = null) |
|
166 | 166 | { |
167 | 167 | $headers = [ |
168 | 168 | 'Accept' => 'application/xml', |
@@ -170,11 +170,11 @@ discard block |
||
170 | 170 | ]; |
171 | 171 | |
172 | 172 | if ($action === 'SubmitFeed') { |
173 | - $headers['Content-Type'] = 'text/xml; charset=iso-8859-1'; |
|
173 | + $headers[ 'Content-Type' ] = 'text/xml; charset=iso-8859-1'; |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | if ($action === 'GetFeedSubmissionResult') { |
177 | - $headers['Content-Type'] = 'x-www-form-urlencoded'; |
|
177 | + $headers[ 'Content-Type' ] = 'x-www-form-urlencoded'; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | $requestOptions = [ |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | return json_decode($json, true); |
191 | 191 | } |
192 | 192 | |
193 | - public function getDefaultQueryParams($action, $version, $params = []) |
|
193 | + public function getDefaultQueryParams($action, $version, $params = [ ]) |
|
194 | 194 | { |
195 | 195 | $queryParameters = [ |
196 | 196 | 'Action' => $action, |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | |
213 | 213 | public function getMarketPlaceParams($type = null) |
214 | 214 | { |
215 | - $params = []; |
|
215 | + $params = [ ]; |
|
216 | 216 | foreach ($this->marketPlaces as $index => $marketPlace) { |
217 | 217 | |
218 | 218 | if ($type === '_UPLOAD_VAT_INVOICE_') { |
@@ -222,18 +222,18 @@ discard block |
||
222 | 222 | } |
223 | 223 | |
224 | 224 | $keyName = $marketPlaceKeyName.($index + 1); |
225 | - $params[$keyName] = $this->countries[$marketPlace]; |
|
225 | + $params[ $keyName ] = $this->countries[ $marketPlace ]; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | return $params; |
229 | 229 | } |
230 | 230 | |
231 | - public function generateRequestUri($action, $version, $params = []) |
|
231 | + public function generateRequestUri($action, $version, $params = [ ]) |
|
232 | 232 | { |
233 | 233 | return http_build_query($this->getDefaultQueryParams($action, $version, $params), '', '&', PHP_QUERY_RFC3986); |
234 | 234 | } |
235 | 235 | |
236 | - public function getQueryStringForSignature($path, $action, $version, $params = []) |
|
236 | + public function getQueryStringForSignature($path, $action, $version, $params = [ ]) |
|
237 | 237 | { |
238 | 238 | return 'POST' |
239 | 239 | ."\n" |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | .$this->generateRequestUri($action, $version, $params); |
245 | 245 | } |
246 | 246 | |
247 | - public function generateSignature($path, $action, $version, $params = []) |
|
247 | + public function generateSignature($path, $action, $version, $params = [ ]) |
|
248 | 248 | { |
249 | 249 | $signature = base64_encode( |
250 | 250 | hash_hmac( |
@@ -258,10 +258,10 @@ discard block |
||
258 | 258 | return $signature; |
259 | 259 | } |
260 | 260 | |
261 | - public function getQuery($path, $action, $version, $params = []) |
|
261 | + public function getQuery($path, $action, $version, $params = [ ]) |
|
262 | 262 | { |
263 | 263 | $queryParameters = $this->getDefaultQueryParams($action, $version, $params); |
264 | - $queryParameters['Signature'] = $this->generateSignature($path, $action, $version, $params); |
|
264 | + $queryParameters[ 'Signature' ] = $this->generateSignature($path, $action, $version, $params); |
|
265 | 265 | |
266 | 266 | return $queryParameters; |
267 | 267 | } |
@@ -9,7 +9,7 @@ |
||
9 | 9 | protected $client; |
10 | 10 | protected $content; |
11 | 11 | protected $type; |
12 | - protected $params = []; |
|
12 | + protected $params = [ ]; |
|
13 | 13 | |
14 | 14 | public function __construct(MWSClient $client) |
15 | 15 | { |