@@ -70,7 +70,7 @@ discard block |
||
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 |
||
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 |
||
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,11 +169,11 @@ discard block |
||
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 | if ($action === 'GetFeedSubmissionResult') { |
176 | - $headers['Content-Type'] = 'x-www-form-urlencoded'; |
|
176 | + $headers[ 'Content-Type' ] = 'x-www-form-urlencoded'; |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | $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, |
@@ -211,21 +211,21 @@ discard block |
||
211 | 211 | |
212 | 212 | public function getMarketPlaceParams() |
213 | 213 | { |
214 | - $params = []; |
|
214 | + $params = [ ]; |
|
215 | 215 | foreach ($this->marketPlaces as $index => $marketPlace) { |
216 | 216 | $keyName = 'MarketplaceId.Id.'.($index + 1); |
217 | - $params[$keyName] = $this->countries[$marketPlace]; |
|
217 | + $params[ $keyName ] = $this->countries[ $marketPlace ]; |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | return $params; |
221 | 221 | } |
222 | 222 | |
223 | - public function generateRequestUri($action, $version, $params = []) |
|
223 | + public function generateRequestUri($action, $version, $params = [ ]) |
|
224 | 224 | { |
225 | 225 | return http_build_query($this->getDefaultQueryParams($action, $version, $params), null, '&', PHP_QUERY_RFC3986); |
226 | 226 | } |
227 | 227 | |
228 | - public function getQueryStringForSignature($path, $action, $version, $params = []) |
|
228 | + public function getQueryStringForSignature($path, $action, $version, $params = [ ]) |
|
229 | 229 | { |
230 | 230 | return 'POST' |
231 | 231 | ."\n" |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | .$this->generateRequestUri($action, $version, $params); |
237 | 237 | } |
238 | 238 | |
239 | - public function generateSignature($path, $action, $version, $params = []) |
|
239 | + public function generateSignature($path, $action, $version, $params = [ ]) |
|
240 | 240 | { |
241 | 241 | $signature = base64_encode( |
242 | 242 | hash_hmac( |
@@ -250,10 +250,10 @@ discard block |
||
250 | 250 | return $signature; |
251 | 251 | } |
252 | 252 | |
253 | - public function getQuery($path, $action, $version, $params = []) |
|
253 | + public function getQuery($path, $action, $version, $params = [ ]) |
|
254 | 254 | { |
255 | 255 | $queryParameters = $this->getDefaultQueryParams($action, $version, $params); |
256 | - $queryParameters['Signature'] = $this->generateSignature($path, $action, $version, $params); |
|
256 | + $queryParameters[ 'Signature' ] = $this->generateSignature($path, $action, $version, $params); |
|
257 | 257 | |
258 | 258 | return $queryParameters; |
259 | 259 | } |