From 6e011044fb330ca48573fac0bc2b5df9c0901750 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Fri, 21 Jan 2022 08:34:10 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/AmazonCore.php | 26 +++++++++++------------ src/AmazonFeedList.php | 18 ++++++++-------- src/AmazonFinancialGroupList.php | 4 ++-- src/AmazonFulfillmentOrderList.php | 4 ++-- src/AmazonInventoryList.php | 6 +++--- src/AmazonMerchantServiceList.php | 12 +++++------ src/AmazonOrderItemList.php | 6 +++--- src/AmazonOrderList.php | 12 +++++------ src/AmazonOrderSet.php | 6 +++--- src/AmazonPrepInfo.php | 8 +++---- src/AmazonProductFeeEstimate.php | 24 ++++++++++----------- src/AmazonProductList.php | 4 ++-- src/AmazonRecommendationList.php | 12 +++++------ src/AmazonReportAcknowledger.php | 6 +++--- src/AmazonReportList.php | 14 ++++++------ src/AmazonReportRequestList.php | 20 ++++++++--------- src/AmazonReportScheduleList.php | 10 ++++----- src/AmazonReportScheduleManager.php | 6 +++--- src/AmazonShipmentItemList.php | 6 +++--- src/AmazonShipmentList.php | 10 ++++----- src/AmazonShipmentPlanner.php | 18 ++++++++-------- src/AmazonSubscriptionDestinationList.php | 4 ++-- src/AmazonSubscriptionList.php | 4 ++-- 23 files changed, 120 insertions(+), 120 deletions(-) diff --git a/src/AmazonCore.php b/src/AmazonCore.php index bf4a94c..ff852b9 100755 --- a/src/AmazonCore.php +++ b/src/AmazonCore.php @@ -164,7 +164,7 @@ protected function __construct($s, $mock = false, $m = null, $config = null) $this->setConfig($config); } - $this->env = __DIR__ . '/environment.php'; + $this->env = __DIR__.'/environment.php'; $this->options['SignatureVersion'] = 2; $this->options['SignatureMethod'] = 'HmacSHA256'; } @@ -255,13 +255,13 @@ protected function fetchMockFile($load = true) ) { $url = $this->mockFiles[$this->mockIndex]; } else { - $url = __DIR__ . '/../tests/mocks/' . $this->mockFiles[$this->mockIndex]; + $url = __DIR__.'/../tests/mocks/'.$this->mockFiles[$this->mockIndex]; } $this->mockIndex++; if (file_exists($url)) { try { - $this->log('Fetched Mock File: ' . basename($url)); + $this->log('Fetched Mock File: '.basename($url)); if ($load) { $return = simplexml_load_file($url); } else { @@ -270,7 +270,7 @@ protected function fetchMockFile($load = true) return $return; } catch (\Exception $e) { - $this->log("Error when opening Mock File: $url - " . $e->getMessage(), 'Warning'); + $this->log("Error when opening Mock File: $url - ".$e->getMessage(), 'Warning'); return false; } @@ -366,15 +366,15 @@ protected function fetchMockResponse() Sender - ' . $r['error'] . ' - ' . $r['answer'] . ' + '.$r['error'].' + '.$r['answer'].' 123 '; } $r['headarray'] = []; - $this->log('Returning Mock Response: ' . $r['code']); + $this->log('Returning Mock Response: '.$r['code']); $this->rawResponses[] = $r; @@ -403,7 +403,7 @@ protected function checkResponse($r) } else { $xml = simplexml_load_string($r['body'])->Error; $this->log( - 'Bad Response! ' . $r['code'] . ' ' . $r['error'] . ': ' . $xml->Code . ' - ' . $xml->Message, + 'Bad Response! '.$r['code'].' '.$r['error'].': '.$xml->Code.' - '.$xml->Message, 'Urgent' ); @@ -643,12 +643,12 @@ protected function genQuery() */ protected function sendRequest($url, $param) { - $this->log('Making request to Amazon: ' . $this->options['Action']); + $this->log('Making request to Amazon: '.$this->options['Action']); $this->throttleCount = 0; $response = $this->fetchURL($url, $param); if (! isset($response['code']) || ! array_key_exists('code', $response)) { - $this->log('Unrecognized response: ' . print_r($response, true)); + $this->log('Unrecognized response: '.print_r($response, true)); return; } @@ -755,7 +755,7 @@ protected function sleep() { flush(); $s = ($this->throttleTime == 1) ? '' : 's'; - $this->log('Request was throttled, Sleeping for ' . $this->throttleTime . " second$s", 'Throttle'); + $this->log('Request was throttled, Sleeping for '.$this->throttleTime." second$s", 'Throttle'); sleep($this->throttleTime); } @@ -911,7 +911,7 @@ protected function _getParametersAsString(array $parameters) { $queryParameters = []; foreach ($parameters as $key => $value) { - $queryParameters[] = $key . '=' . $this->_urlencode($value); + $queryParameters[] = $key.'='.$this->_urlencode($value); } return implode('&', $queryParameters); @@ -950,7 +950,7 @@ protected function _calculateStringToSignV2(array $parameters) { $data = 'POST'; $data .= "\n"; - $endpoint = parse_url($this->urlbase . $this->urlbranch); + $endpoint = parse_url($this->urlbase.$this->urlbranch); $data .= $endpoint['host']; $data .= "\n"; $uri = array_key_exists('path', $endpoint) ? $endpoint['path'] : null; diff --git a/src/AmazonFeedList.php b/src/AmazonFeedList.php index c7b0764..9de033c 100755 --- a/src/AmazonFeedList.php +++ b/src/AmazonFeedList.php @@ -119,7 +119,7 @@ public function setFeedIds($s) $this->resetFeedIds(); $i = 1; foreach ($s as $x) { - $this->options['FeedSubmissionIdList.Id.' . $i] = $x; + $this->options['FeedSubmissionIdList.Id.'.$i] = $x; $i++; } } else { @@ -162,7 +162,7 @@ public function setFeedTypes($s) $this->resetFeedTypes(); $i = 1; foreach ($s as $x) { - $this->options['FeedTypeList.Type.' . $i] = $x; + $this->options['FeedTypeList.Type.'.$i] = $x; $i++; } } else { @@ -206,7 +206,7 @@ public function setFeedStatuses($s) $this->resetFeedStatuses(); $i = 1; foreach ($s as $x) { - $this->options['FeedProcessingStatusList.Status.' . $i] = $x; + $this->options['FeedProcessingStatusList.Status.'.$i] = $x; $i++; } } else { @@ -298,11 +298,11 @@ public function fetchFeedSubmissions($r = true) { $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { @@ -411,11 +411,11 @@ public function countFeeds() { $this->prepareCount(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { @@ -470,11 +470,11 @@ public function cancelFeeds() { $this->prepareCancel(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonFinancialGroupList.php b/src/AmazonFinancialGroupList.php index 1b9b4da..906de20 100644 --- a/src/AmazonFinancialGroupList.php +++ b/src/AmazonFinancialGroupList.php @@ -135,11 +135,11 @@ public function fetchGroupList($r = true) $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; diff --git a/src/AmazonFulfillmentOrderList.php b/src/AmazonFulfillmentOrderList.php index 37e69fd..c049e17 100755 --- a/src/AmazonFulfillmentOrderList.php +++ b/src/AmazonFulfillmentOrderList.php @@ -151,11 +151,11 @@ public function fetchOrderList($r = true) { $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; diff --git a/src/AmazonInventoryList.php b/src/AmazonInventoryList.php index 8623f99..5366c5c 100755 --- a/src/AmazonInventoryList.php +++ b/src/AmazonInventoryList.php @@ -130,7 +130,7 @@ public function setSellerSkus($a) $this->resetSkus(); $i = 1; foreach ($a as $x) { - $this->options['SellerSkus.member.' . $i] = $x; + $this->options['SellerSkus.member.'.$i] = $x; $i++; } } else { @@ -192,11 +192,11 @@ public function fetchInventoryList($r = true) } $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; diff --git a/src/AmazonMerchantServiceList.php b/src/AmazonMerchantServiceList.php index 62d54d1..a1a6b37 100644 --- a/src/AmazonMerchantServiceList.php +++ b/src/AmazonMerchantServiceList.php @@ -126,8 +126,8 @@ public function setItems($a) $i = 1; foreach ($a as $x) { if (is_array($x) && isset($x['OrderItemId']) && isset($x['Quantity'])) { - $this->options['ShipmentRequestDetails.ItemList.Item.' . $i . '.OrderItemId'] = $x['OrderItemId']; - $this->options['ShipmentRequestDetails.ItemList.Item.' . $i . '.Quantity'] = $x['Quantity']; + $this->options['ShipmentRequestDetails.ItemList.Item.'.$i.'.OrderItemId'] = $x['OrderItemId']; + $this->options['ShipmentRequestDetails.ItemList.Item.'.$i.'.Quantity'] = $x['Quantity']; $i++; } else { $this->resetItems(); @@ -376,7 +376,7 @@ public function setMaxArrivalDate($d) $this->options['ShipmentRequestDetails.MustArriveByDate'] = $this->genTime($d); } catch (Exception $e) { unset($this->options['ShipmentRequestDetails.MustArriveByDate']); - $this->log('Error: ' . $e->getMessage(), 'Warning'); + $this->log('Error: '.$e->getMessage(), 'Warning'); return false; } @@ -396,7 +396,7 @@ public function setShipDate($d) $this->options['ShipmentRequestDetails.ShipDate'] = $this->genTime($d); } catch (Exception $e) { unset($this->options['ShipmentRequestDetails.ShipDate']); - $this->log('Error: ' . $e->getMessage(), 'Warning'); + $this->log('Error: '.$e->getMessage(), 'Warning'); return false; } @@ -553,11 +553,11 @@ public function fetchServices() return false; } - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonOrderItemList.php b/src/AmazonOrderItemList.php index 9d6145c..bd231ee 100755 --- a/src/AmazonOrderItemList.php +++ b/src/AmazonOrderItemList.php @@ -138,11 +138,11 @@ public function fetchItems($r = true) { $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { @@ -162,7 +162,7 @@ public function fetchItems($r = true) } else { if (isset($this->options['AmazonOrderId']) && $this->options['AmazonOrderId'] && $this->options['AmazonOrderId'] != $xml->AmazonOrderId) { $this->log( - 'You grabbed the wrong Order\'s items! - ' . $this->options['AmazonOrderId'] . ' =/= ' . $xml->AmazonOrderId, + 'You grabbed the wrong Order\'s items! - '.$this->options['AmazonOrderId'].' =/= '.$xml->AmazonOrderId, 'Urgent' ); } diff --git a/src/AmazonOrderList.php b/src/AmazonOrderList.php index 4ceaad8..37369f3 100755 --- a/src/AmazonOrderList.php +++ b/src/AmazonOrderList.php @@ -139,7 +139,7 @@ public function setLimits($mode, $lower = null, $upper = null) $after = $this->genTime('- 2 min'); } if ($after > $before) { - $after = $this->genTime($upper . ' - 150 sec'); + $after = $this->genTime($upper.' - 150 sec'); } if ($mode == 'Created') { $this->options['CreatedAfter'] = $after; @@ -163,7 +163,7 @@ public function setLimits($mode, $lower = null, $upper = null) } } } catch (\Exception $e) { - $this->log('Error: ' . $e->getMessage(), 'Warning'); + $this->log('Error: '.$e->getMessage(), 'Warning'); return false; } @@ -192,7 +192,7 @@ public function setOrderStatusFilter($list) $this->resetOrderStatusFilter(); $i = 1; foreach ($list as $x) { - $this->options['OrderStatus.Status.' . $i] = $x; + $this->options['OrderStatus.Status.'.$i] = $x; $i++; } } else { @@ -258,7 +258,7 @@ public function setPaymentMethodFilter($list) $this->resetPaymentMethodFilter(); $i = 1; foreach ($list as $x) { - $this->options['PaymentMethod.' . $i++] = $x; + $this->options['PaymentMethod.'.$i++] = $x; } } else { return false; @@ -383,11 +383,11 @@ public function fetchOrders($r = true) $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonOrderSet.php b/src/AmazonOrderSet.php index ff60cbc..c846a01 100755 --- a/src/AmazonOrderSet.php +++ b/src/AmazonOrderSet.php @@ -92,7 +92,7 @@ public function setOrderIds($o) if (is_array($o)) { $k = 1; foreach ($o as $id) { - $this->options['AmazonOrderId.Id.' . $k] = $id; + $this->options['AmazonOrderId.Id.'.$k] = $id; $k++; } } else { @@ -136,11 +136,11 @@ public function fetchOrders() return false; } - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonPrepInfo.php b/src/AmazonPrepInfo.php index c767e08..3d1a091 100644 --- a/src/AmazonPrepInfo.php +++ b/src/AmazonPrepInfo.php @@ -55,7 +55,7 @@ public function setSkus($s) $this->resetSKUs(); $i = 1; foreach ($s as $x) { - $this->options['SellerSKUList.Id.' . $i] = $x; + $this->options['SellerSKUList.Id.'.$i] = $x; $i++; } } else { @@ -120,7 +120,7 @@ public function setAsins($s) $this->resetASINs(); $i = 1; foreach ($s as $x) { - $this->options['ASINList.Id.' . $i] = $x; + $this->options['ASINList.Id.'.$i] = $x; $i++; } } else { @@ -173,11 +173,11 @@ public function fetchPrepInstructions() $this->preparePrep(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile(); } else { diff --git a/src/AmazonProductFeeEstimate.php b/src/AmazonProductFeeEstimate.php index 551e896..21d09e9 100644 --- a/src/AmazonProductFeeEstimate.php +++ b/src/AmazonProductFeeEstimate.php @@ -103,20 +103,20 @@ public function setRequests($a) array_key_exists('IsAmazonFulfilled', $x) && is_array($x['ListingPrice']) && array_key_exists('CurrencyCode', $x['ListingPrice']) && array_key_exists('Value', $x['ListingPrice'])) { - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.MarketplaceId'] = $x['MarketplaceId']; - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.IdType'] = $x['IdType']; - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.IdValue'] = $x['IdValue']; - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.PriceToEstimateFees.ListingPrice.CurrencyCode'] = $x['ListingPrice']['CurrencyCode']; - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.PriceToEstimateFees.ListingPrice.Amount'] = $x['ListingPrice']['Value']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.MarketplaceId'] = $x['MarketplaceId']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.IdType'] = $x['IdType']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.IdValue'] = $x['IdValue']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.PriceToEstimateFees.ListingPrice.CurrencyCode'] = $x['ListingPrice']['CurrencyCode']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.PriceToEstimateFees.ListingPrice.Amount'] = $x['ListingPrice']['Value']; if (isset($x['Shipping']) && is_array($x['Shipping'])) { - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.PriceToEstimateFees.Shipping.CurrencyCode'] = $x['Shipping']['CurrencyCode']; - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.PriceToEstimateFees.Shipping.Amount'] = $x['Shipping']['Value']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.PriceToEstimateFees.Shipping.CurrencyCode'] = $x['Shipping']['CurrencyCode']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.PriceToEstimateFees.Shipping.Amount'] = $x['Shipping']['Value']; } if (array_key_exists('Points', $x)) { - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.PriceToEstimateFees.Points.PointsNumber'] = $x['Points']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.PriceToEstimateFees.Points.PointsNumber'] = $x['Points']; } - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.Identifier'] = $x['Identifier']; - $this->options['FeesEstimateRequestList.FeesEstimateRequest.' . $i . '.IsAmazonFulfilled'] = $x['IsAmazonFulfilled']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.Identifier'] = $x['Identifier']; + $this->options['FeesEstimateRequestList.FeesEstimateRequest.'.$i.'.IsAmazonFulfilled'] = $x['IsAmazonFulfilled']; $i++; } else { @@ -159,11 +159,11 @@ public function fetchEstimates() return false; } - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile(); diff --git a/src/AmazonProductList.php b/src/AmazonProductList.php index 18fdd92..efb21da 100755 --- a/src/AmazonProductList.php +++ b/src/AmazonProductList.php @@ -90,7 +90,7 @@ public function setProductIds($s) $this->resetProductIds(); $i = 1; foreach ($s as $x) { - $this->options['IdList.Id.' . $i] = $x; + $this->options['IdList.Id.'.$i] = $x; $i++; } } else { @@ -135,7 +135,7 @@ public function fetchProductList() return false; } - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); diff --git a/src/AmazonRecommendationList.php b/src/AmazonRecommendationList.php index 4e2b25c..557681f 100644 --- a/src/AmazonRecommendationList.php +++ b/src/AmazonRecommendationList.php @@ -123,11 +123,11 @@ public function setFilter($a) return false; } - $prefix = 'CategoryQueryList.CategoryQuery.' . $i; - $this->options[$prefix . '.RecommendationCategory'] = $c; + $prefix = 'CategoryQueryList.CategoryQuery.'.$i; + $this->options[$prefix.'.RecommendationCategory'] = $c; $j = 1; foreach ($r as $k => $x) { - $this->options[$prefix . '.FilterOptions.FilterOption.' . $j] = $k . '=' . $x; + $this->options[$prefix.'.FilterOptions.FilterOption.'.$j] = $k.'='.$x; $j++; } $i++; @@ -182,7 +182,7 @@ public function fetchLastUpdateTimes() $this->prepareTimes(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); @@ -240,11 +240,11 @@ public function fetchRecommendations($r = true) $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonReportAcknowledger.php b/src/AmazonReportAcknowledger.php index 19c84cf..208c55f 100755 --- a/src/AmazonReportAcknowledger.php +++ b/src/AmazonReportAcknowledger.php @@ -91,7 +91,7 @@ public function setReportIds($s) $this->resetReportIds(); $i = 1; foreach ($s as $x) { - $this->options['ReportIdList.Id.' . $i] = $x; + $this->options['ReportIdList.Id.'.$i] = $x; $i++; } } else { @@ -160,11 +160,11 @@ public function acknowledgeReports() return false; } - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonReportList.php b/src/AmazonReportList.php index 77b1a4b..338fc7b 100755 --- a/src/AmazonReportList.php +++ b/src/AmazonReportList.php @@ -114,7 +114,7 @@ public function setRequestIds($s) $this->resetRequestIds(); $i = 1; foreach ($s as $x) { - $this->options['ReportRequestIdList.Id.' . $i] = $x; + $this->options['ReportRequestIdList.Id.'.$i] = $x; $i++; } } else { @@ -156,7 +156,7 @@ public function setReportTypes($s) $this->resetReportTypes(); $i = 1; foreach ($s as $x) { - $this->options['ReportTypeList.Type.' . $i] = $x; + $this->options['ReportTypeList.Type.'.$i] = $x; $i++; } } else { @@ -251,7 +251,7 @@ public function setTimeLimits($s = null, $e = null) isset($this->options['AvailableToDate']) && $this->options['AvailableFromDate'] > $this->options['AvailableToDate'] ) { - $this->setTimeLimits($this->options['AvailableToDate'] . ' - 1 second'); + $this->setTimeLimits($this->options['AvailableToDate'].' - 1 second'); } } @@ -282,11 +282,11 @@ public function fetchReportList($r = true) { $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; @@ -393,11 +393,11 @@ public function fetchCount() { $this->prepareCount(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonReportRequestList.php b/src/AmazonReportRequestList.php index a6415ac..a5f842f 100755 --- a/src/AmazonReportRequestList.php +++ b/src/AmazonReportRequestList.php @@ -117,7 +117,7 @@ public function setRequestIds($s) $this->resetRequestIds(); $i = 1; foreach ($s as $x) { - $this->options['ReportRequestIdList.Id.' . $i] = $x; + $this->options['ReportRequestIdList.Id.'.$i] = $x; $i++; } } else { @@ -159,7 +159,7 @@ public function setReportTypes($s) $this->resetReportTypes(); $i = 1; foreach ($s as $x) { - $this->options['ReportTypeList.Type.' . $i] = $x; + $this->options['ReportTypeList.Type.'.$i] = $x; $i++; } } else { @@ -201,7 +201,7 @@ public function setReportStatuses($s) $this->resetReportStatuses(); $i = 1; foreach ($s as $x) { - $this->options['ReportProcessingStatusList.Status.' . $i] = $x; + $this->options['ReportProcessingStatusList.Status.'.$i] = $x; $i++; } } else { @@ -269,7 +269,7 @@ public function setTimeLimits($s = null, $e = null) isset($this->options['RequestedToDate']) && $this->options['RequestedFromDate'] > $this->options['RequestedToDate'] ) { - $this->setTimeLimits($this->options['RequestedToDate'] . ' - 1 second'); + $this->setTimeLimits($this->options['RequestedToDate'].' - 1 second'); } } @@ -300,11 +300,11 @@ public function fetchRequestList($r = true) { $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { @@ -446,11 +446,11 @@ public function cancelRequests() { $this->prepareCancel(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; @@ -479,11 +479,11 @@ public function fetchCount() { $this->prepareCount(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonReportScheduleList.php b/src/AmazonReportScheduleList.php index 30e66d7..327d922 100755 --- a/src/AmazonReportScheduleList.php +++ b/src/AmazonReportScheduleList.php @@ -117,7 +117,7 @@ public function setReportTypes($s) $this->resetReportTypes(); $i = 1; foreach ($s as $x) { - $this->options['ReportTypeList.Type.' . $i] = $x; + $this->options['ReportTypeList.Type.'.$i] = $x; $i++; } } else { @@ -156,11 +156,11 @@ public function fetchReportList($r = true) { $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; @@ -261,11 +261,11 @@ public function fetchCount() { $this->prepareCount(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonReportScheduleManager.php b/src/AmazonReportScheduleManager.php index aa3f179..613a45e 100755 --- a/src/AmazonReportScheduleManager.php +++ b/src/AmazonReportScheduleManager.php @@ -154,7 +154,7 @@ public function setScheduledDate($t = null) } $this->options['ScheduledDate'] = $after; } catch (Exception $e) { - $this->log('Error: ' . $e->getMessage(), 'Warning'); + $this->log('Error: '.$e->getMessage(), 'Warning'); } } @@ -180,11 +180,11 @@ public function manageReportSchedule() return false; } - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; diff --git a/src/AmazonShipmentItemList.php b/src/AmazonShipmentItemList.php index dfa6cd5..38a5f4e 100755 --- a/src/AmazonShipmentItemList.php +++ b/src/AmazonShipmentItemList.php @@ -146,7 +146,7 @@ public function setTimeLimits($lower = null, $upper = null) $this->options['LastUpdatedAfter'] > $this->options['LastUpdatedBefore'] ) { $this->setTimeLimits( - $this->options['LastUpdatedBefore'] . ' - 1 second', + $this->options['LastUpdatedBefore'].' - 1 second', $this->options['LastUpdatedBefore'] ); } @@ -192,11 +192,11 @@ public function fetchItems($r = true) $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonShipmentList.php b/src/AmazonShipmentList.php index b7f3d38..2810f20 100755 --- a/src/AmazonShipmentList.php +++ b/src/AmazonShipmentList.php @@ -121,7 +121,7 @@ public function setStatusFilter($s) $this->resetStatusFilter(); $i = 1; foreach ($s as $x) { - $this->options['ShipmentStatusList.member.' . $i] = $x; + $this->options['ShipmentStatusList.member.'.$i] = $x; $i++; } } else { @@ -166,7 +166,7 @@ public function setIdFilter($s) $this->resetIdFilter(); $i = 1; foreach ($s as $x) { - $this->options['ShipmentIdList.member.' . $i] = $x; + $this->options['ShipmentIdList.member.'.$i] = $x; $i++; } } else { @@ -220,7 +220,7 @@ public function setTimeLimits($lower = null, $upper = null) $this->options['LastUpdatedAfter'] > $this->options['LastUpdatedBefore'] ) { $this->setTimeLimits( - $this->options['LastUpdatedBefore'] . ' - 1 second', + $this->options['LastUpdatedBefore'].' - 1 second', $this->options['LastUpdatedBefore'] ); } @@ -266,11 +266,11 @@ public function fetchShipments($r = true) $this->prepareToken(); - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonShipmentPlanner.php b/src/AmazonShipmentPlanner.php index 96fa9ea..16d2565 100755 --- a/src/AmazonShipmentPlanner.php +++ b/src/AmazonShipmentPlanner.php @@ -227,16 +227,16 @@ public function setItems($a) $i = 1; foreach ($a as $x) { if (array_key_exists('SellerSKU', $x) && array_key_exists('Quantity', $x)) { - $this->options['InboundShipmentPlanRequestItems.member.' . $i . '.SellerSKU'] = $x['SellerSKU']; - $this->options['InboundShipmentPlanRequestItems.member.' . $i . '.Quantity'] = $x['Quantity']; + $this->options['InboundShipmentPlanRequestItems.member.'.$i.'.SellerSKU'] = $x['SellerSKU']; + $this->options['InboundShipmentPlanRequestItems.member.'.$i.'.Quantity'] = $x['Quantity']; if (array_key_exists('ASIN', $x)) { - $this->options['InboundShipmentPlanRequestItems.member.' . $i . '.ASIN'] = $x['ASIN']; + $this->options['InboundShipmentPlanRequestItems.member.'.$i.'.ASIN'] = $x['ASIN']; } if (array_key_exists('QuantityInCase', $x)) { - $this->options['InboundShipmentPlanRequestItems.member.' . $i . '.QuantityInCase'] = $x['QuantityInCase']; + $this->options['InboundShipmentPlanRequestItems.member.'.$i.'.QuantityInCase'] = $x['QuantityInCase']; } if (array_key_exists('Condition', $x)) { - $this->options['InboundShipmentPlanRequestItems.member.' . $i . '.Condition'] = $x['Condition']; + $this->options['InboundShipmentPlanRequestItems.member.'.$i.'.Condition'] = $x['Condition']; } if (array_key_exists('PrepDetailsList', $x) && is_array($x['PrepDetailsList'])) { $j = 1; @@ -245,8 +245,8 @@ public function setItems($a) $this->log('Tried to set invalid prep details for item', 'Warning'); continue; } - $this->options['InboundShipmentPlanRequestItems.member.' . $i . '.PrepDetailsList.PrepDetails.' . $j . '.PrepInstruction'] = $z['PrepInstruction']; - $this->options['InboundShipmentPlanRequestItems.member.' . $i . '.PrepDetailsList.PrepDetails.' . $j . '.PrepOwner'] = $z['PrepOwner']; + $this->options['InboundShipmentPlanRequestItems.member.'.$i.'.PrepDetailsList.PrepDetails.'.$j.'.PrepInstruction'] = $z['PrepInstruction']; + $this->options['InboundShipmentPlanRequestItems.member.'.$i.'.PrepDetailsList.PrepDetails.'.$j.'.PrepOwner'] = $z['PrepOwner']; $j++; } } @@ -298,11 +298,11 @@ public function fetchPlan() return false; } - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path->InboundShipmentPlans; } else { diff --git a/src/AmazonSubscriptionDestinationList.php b/src/AmazonSubscriptionDestinationList.php index fddd364..2a15f98 100644 --- a/src/AmazonSubscriptionDestinationList.php +++ b/src/AmazonSubscriptionDestinationList.php @@ -54,11 +54,11 @@ public function fetchDestinations() $this->options['Action'] = 'ListRegisteredDestinations'; - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else { diff --git a/src/AmazonSubscriptionList.php b/src/AmazonSubscriptionList.php index 1b2ba1e..acd67bd 100644 --- a/src/AmazonSubscriptionList.php +++ b/src/AmazonSubscriptionList.php @@ -53,11 +53,11 @@ public function fetchSubscriptions() $this->options['Action'] = 'ListSubscriptions'; - $url = $this->urlbase . $this->urlbranch; + $url = $this->urlbase.$this->urlbranch; $query = $this->genQuery(); - $path = $this->options['Action'] . 'Result'; + $path = $this->options['Action'].'Result'; if ($this->mockMode) { $xml = $this->fetchMockFile()->$path; } else {