@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | $node = $document->createElement('Product'); |
82 | 82 | for ($i = 1; $i <= 3; $i++) { |
83 | - $desc = $this->{'getDescription' . $i}(); |
|
83 | + $desc = $this->{'getDescription'.$i}(); |
|
84 | 84 | if ($desc !== null) { |
85 | 85 | $node->appendChild($document->createElement('Description', $desc)); |
86 | 86 | } |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function noCandidates() |
32 | 32 | { |
33 | 33 | if (AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) { |
34 | - throw new \BadMethodCallException(__METHOD__ . ' should not be called on Address Classification only requests.'); |
|
34 | + throw new \BadMethodCallException(__METHOD__.' should not be called on Address Classification only requests.'); |
|
35 | 35 | } |
36 | 36 | return isset($this->response->NoCandidatesIndicator); |
37 | 37 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | public function isAmbiguous() |
63 | 63 | { |
64 | 64 | if (AddressValidation::REQUEST_OPTION_ADDRESS_CLASSIFICATION == $this->requestAction) { |
65 | - throw new \BadMethodCallException(__METHOD__ . ' should not be called on Address Classification only requests.'); |
|
65 | + throw new \BadMethodCallException(__METHOD__.' should not be called on Address Classification only requests.'); |
|
66 | 66 | } |
67 | 67 | return isset($this->response->AmbiguousAddressIndicator); |
68 | 68 | } |
@@ -60,16 +60,16 @@ |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | for ($i = 1; $i <= 3; $i++) { |
63 | - $line = $this->{'getAddressLine' . $i}(); |
|
63 | + $line = $this->{'getAddressLine'.$i}(); |
|
64 | 64 | if ($line) { |
65 | - $node->appendChild($document->createElement('AddressLine' . ($i == 1 ? '' : $i), $line)); |
|
65 | + $node->appendChild($document->createElement('AddressLine'.($i == 1 ? '' : $i), $line)); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | 69 | for ($i = 1; $i <= 3; $i++) { |
70 | - $line = $this->{'getPoliticalDivision' . $i}(); |
|
70 | + $line = $this->{'getPoliticalDivision'.$i}(); |
|
71 | 71 | if ($line) { |
72 | - $node->appendChild($document->createElement('PoliticalDivision' . $i, $line)); |
|
72 | + $node->appendChild($document->createElement('PoliticalDivision'.$i, $line)); |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | ); |
98 | 98 | |
99 | 99 | // Initialize soap client |
100 | - $client = new SoapClient(__DIR__ . '/WSDL/' . $wsdl . '.wsdl', $mode); |
|
100 | + $client = new SoapClient(__DIR__.'/WSDL/'.$wsdl.'.wsdl', $mode); |
|
101 | 101 | |
102 | 102 | // Set endpoint URL + auth & request data |
103 | 103 | $client->__setLocation($endpointurl); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | 'endpointurl' => $this->getEndpointUrl(), |
117 | 117 | ]); |
118 | 118 | |
119 | - $this->logger->debug('Request: ' . $this->getRequest(), [ |
|
119 | + $this->logger->debug('Request: '.$this->getRequest(), [ |
|
120 | 120 | 'id' => $id, |
121 | 121 | 'endpointurl' => $this->getEndpointUrl(), |
122 | 122 | ]); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | 'endpointurl' => $this->getEndpointUrl(), |
133 | 133 | ]); |
134 | 134 | |
135 | - $this->logger->debug('Response: ' . $body, [ |
|
135 | + $this->logger->debug('Response: '.$body, [ |
|
136 | 136 | 'id' => $id, |
137 | 137 | 'endpointurl' => $this->getEndpointUrl(), |
138 | 138 | ]); |
@@ -155,14 +155,14 @@ discard block |
||
155 | 155 | 'endpointurl' => $this->getEndpointUrl(), |
156 | 156 | ]); |
157 | 157 | |
158 | - throw new InvalidResponseException('Failure: ' . (string)$errorMsg[0] . ' (' . (string)$errorCode[0] . ')'); |
|
158 | + throw new InvalidResponseException('Failure: '.(string)$errorMsg[0].' ('.(string)$errorCode[0].')'); |
|
159 | 159 | } else { |
160 | 160 | $this->logger->alert($e->getMessage(), [ |
161 | 161 | 'id' => $id, |
162 | 162 | 'endpointurl' => $this->getEndpointUrl(), |
163 | 163 | ]); |
164 | 164 | |
165 | - throw new InvalidResponseException('Cannot parse error from UPS: ' . $e->getMessage(), $e->getCode(), |
|
165 | + throw new InvalidResponseException('Cannot parse error from UPS: '.$e->getMessage(), $e->getCode(), |
|
166 | 166 | $e); |
167 | 167 | } |
168 | 168 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
163 | - * @param $accessPointCOD |
|
163 | + * @param AccessPointCOD $accessPointCOD |
|
164 | 164 | * @return $this |
165 | 165 | */ |
166 | 166 | public function setAccessPointCOD($accessPointCOD) |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
183 | - * @return mixed |
|
183 | + * @return InternationalForms |
|
184 | 184 | */ |
185 | 185 | public function getInternationalForms() |
186 | 186 | { |
@@ -34,46 +34,46 @@ |
||
34 | 34 | const S_UPSWW_EXPRESSFREIGHT = '96'; |
35 | 35 | |
36 | 36 | // Time in Transit Response Service Codes: United States Domestic Shipments |
37 | - const TT_S_US_AIR_1DAYAM = '1DM'; // UPS Next Day Air Early |
|
38 | - const TT_S_US_AIR_1DAY = '1DA'; // UPS Next Day Air |
|
39 | - const TT_S_US_AIR_SAVER = '1DP'; // UPS Next Day Air Saver |
|
40 | - const TT_S_US_AIR_2DAYAM = '2DM'; // UPS Second Day Air A.M. |
|
41 | - const TT_S_US_AIR_2DAY = '2DA'; // UPS Second Day Air |
|
42 | - const TT_S_US_3DAYSELECT = '3DS'; // UPS Three-Day Select |
|
43 | - const TT_S_US_GROUND = 'GND'; // UPS Ground |
|
37 | + const TT_S_US_AIR_1DAYAM = '1DM'; // UPS Next Day Air Early |
|
38 | + const TT_S_US_AIR_1DAY = '1DA'; // UPS Next Day Air |
|
39 | + const TT_S_US_AIR_SAVER = '1DP'; // UPS Next Day Air Saver |
|
40 | + const TT_S_US_AIR_2DAYAM = '2DM'; // UPS Second Day Air A.M. |
|
41 | + const TT_S_US_AIR_2DAY = '2DA'; // UPS Second Day Air |
|
42 | + const TT_S_US_3DAYSELECT = '3DS'; // UPS Three-Day Select |
|
43 | + const TT_S_US_GROUND = 'GND'; // UPS Ground |
|
44 | 44 | const TT_S_US_AIR_1DAYSATAM = '1DMS'; // UPS Next Day Air Early (Saturday Delivery) |
45 | 45 | const TT_S_US_AIR_1DAYSAT = '1DAS'; // UPS Next Day Air (Saturday Delivery) |
46 | 46 | const TT_S_US_AIR_2DAYSAT = '2DAS'; // UPS Second Day Air (Saturday Delivery) |
47 | 47 | |
48 | 48 | // Time in Transit Response Service Codes: Other Shipments Originating in US |
49 | - const TT_S_US_INTL_EXPRESSPLUS = '21'; // UPS Worldwide Express Plus |
|
50 | - const TT_S_US_INTL_EXPRESS = '01'; // UPS Worldwide Express |
|
51 | - const TT_S_US_INTL_SAVER = '28'; // UPS Worldwide Express Saver |
|
52 | - const TT_S_US_INTL_STANDARD = '03'; // UPS Standard |
|
53 | - const TT_S_US_INTL_EXPEDITED = '05'; // UPS Worldwide Expedited |
|
49 | + const TT_S_US_INTL_EXPRESSPLUS = '21'; // UPS Worldwide Express Plus |
|
50 | + const TT_S_US_INTL_EXPRESS = '01'; // UPS Worldwide Express |
|
51 | + const TT_S_US_INTL_SAVER = '28'; // UPS Worldwide Express Saver |
|
52 | + const TT_S_US_INTL_STANDARD = '03'; // UPS Standard |
|
53 | + const TT_S_US_INTL_EXPEDITED = '05'; // UPS Worldwide Expedited |
|
54 | 54 | |
55 | 55 | // Time in Transit Response Service Codes: Shipments Originating in the EU |
56 | 56 | // Destination is WITHIN the Origin Country |
57 | - const TT_S_EU_EXPRESSPLUS = '23'; // UPS Express Plus |
|
58 | - const TT_S_EU_EXPRESS = '24'; // UPS Express |
|
59 | - const TT_S_EU_SAVER = '26'; // UPS Express Saver |
|
60 | - const TT_S_EU_STANDARD = '25'; // UPS Standard |
|
57 | + const TT_S_EU_EXPRESSPLUS = '23'; // UPS Express Plus |
|
58 | + const TT_S_EU_EXPRESS = '24'; // UPS Express |
|
59 | + const TT_S_EU_SAVER = '26'; // UPS Express Saver |
|
60 | + const TT_S_EU_STANDARD = '25'; // UPS Standard |
|
61 | 61 | |
62 | 62 | // Time in Transit Response Service Codes: Shipments Originating in the EU |
63 | 63 | // Destination is Another EU Country |
64 | - const TT_S_EU_TO_EU_EXPRESSPLUS = '22'; // UPS Express Plus |
|
65 | - const TT_S_EU_TO_EU_EXPRESS = '10'; // UPS Express |
|
66 | - const TT_S_EU_TO_EU_SAVER = '18'; // UPS Express Saver |
|
67 | - const TT_S_EU_TO_EU_STANDARD = '08'; // UPS Standard |
|
64 | + const TT_S_EU_TO_EU_EXPRESSPLUS = '22'; // UPS Express Plus |
|
65 | + const TT_S_EU_TO_EU_EXPRESS = '10'; // UPS Express |
|
66 | + const TT_S_EU_TO_EU_SAVER = '18'; // UPS Express Saver |
|
67 | + const TT_S_EU_TO_EU_STANDARD = '08'; // UPS Standard |
|
68 | 68 | |
69 | 69 | // Time in Transit Response Service Codes: Shipments Originating in the EU |
70 | 70 | // Destination is Outside the EU |
71 | - const TT_S_EU_TO_OTHER_EXPRESS_NA1 = '11'; // UPS Express NA 1 |
|
72 | - const TT_S_EU_TO_OTHER_EXPRESSPLUS = '21'; // UPS Worldwide Express Plus |
|
73 | - const TT_S_EU_TO_OTHER_EXPRESS = '01'; // UPS Express |
|
74 | - const TT_S_EU_TO_OTHER_SAVER = '28'; // UPS Express Saver |
|
75 | - const TT_S_EU_TO_OTHER_EXPEDITED = '05'; // UPS Expedited |
|
76 | - const TT_S_EU_TO_OTHER_STANDARD = '68'; // UPS Standard |
|
71 | + const TT_S_EU_TO_OTHER_EXPRESS_NA1 = '11'; // UPS Express NA 1 |
|
72 | + const TT_S_EU_TO_OTHER_EXPRESSPLUS = '21'; // UPS Worldwide Express Plus |
|
73 | + const TT_S_EU_TO_OTHER_EXPRESS = '01'; // UPS Express |
|
74 | + const TT_S_EU_TO_OTHER_SAVER = '28'; // UPS Express Saver |
|
75 | + const TT_S_EU_TO_OTHER_EXPEDITED = '05'; // UPS Expedited |
|
76 | + const TT_S_EU_TO_OTHER_STANDARD = '68'; // UPS Standard |
|
77 | 77 | |
78 | 78 | private static $serviceNames = [ |
79 | 79 | '01' => 'UPS Next Day Air', |
@@ -8,8 +8,8 @@ |
||
8 | 8 | |
9 | 9 | class POA implements NodeInterface |
10 | 10 | { |
11 | - const POA_ONE_TIME = '1'; // One Time POA |
|
12 | - const POA_BLANKET = '2'; // Blanket POA |
|
11 | + const POA_ONE_TIME = '1'; // One Time POA |
|
12 | + const POA_BLANKET = '2'; // Blanket POA |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @var string |
@@ -8,9 +8,9 @@ |
||
8 | 8 | |
9 | 9 | class ShipperFiled implements NodeInterface |
10 | 10 | { |
11 | - const SF_ITN = 'A'; // Requires the ITN |
|
12 | - const SF_EXEMPTION_LEGEND = 'B'; // Requires the Exemption Legend |
|
13 | - const SF_POST_DEPARTURE_FILING = 'C'; // Requires Post Departure Filing Citation |
|
11 | + const SF_ITN = 'A'; // Requires the ITN |
|
12 | + const SF_EXEMPTION_LEGEND = 'B'; // Requires the Exemption Legend |
|
13 | + const SF_POST_DEPARTURE_FILING = 'C'; // Requires Post Departure Filing Citation |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * @var string |
@@ -8,8 +8,8 @@ |
||
8 | 8 | |
9 | 9 | class EEIFilingOption implements NodeInterface |
10 | 10 | { |
11 | - const FO_SHIPPER = '1'; // Shipper Filed |
|
12 | - const FO_UPS = '3'; // UPS Filed |
|
11 | + const FO_SHIPPER = '1'; // Shipper Filed |
|
12 | + const FO_UPS = '3'; // UPS Filed |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * @var string |