@@ -184,10 +184,10 @@ discard block |
||
184 | 184 | * |
185 | 185 | * @param string $url The URL to call. |
186 | 186 | * @param string $body The data to pass. |
187 | - * @param array $headers The headers to pass. |
|
187 | + * @param string[] $headers The headers to pass. |
|
188 | 188 | * @param string $method The HTTP-method to use. |
189 | 189 | * @param bool $expectXML Do we expect XML? |
190 | - * @return mixed |
|
190 | + * @return \SimpleXMLElement |
|
191 | 191 | * @throws BpostCurlException |
192 | 192 | * @throws BpostInvalidResponseException |
193 | 193 | * @throws BpostInvalidSelectionException |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | /** |
510 | 510 | * Get the possible label formats |
511 | 511 | * |
512 | - * @return array |
|
512 | + * @return string[] |
|
513 | 513 | */ |
514 | 514 | public static function getPossibleLabelFormatValues() |
515 | 515 | { |
@@ -102,9 +102,9 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function __construct($accountId, $passPhrase, $apiUrl = self::API_URL) |
104 | 104 | { |
105 | - $this->accountId = (string)$accountId; |
|
106 | - $this->passPhrase = (string)$passPhrase; |
|
107 | - $this->apiUrl = (string)$apiUrl; |
|
105 | + $this->accountId = (string) $accountId; |
|
106 | + $this->passPhrase = (string) $passPhrase; |
|
107 | + $this->apiUrl = (string) $apiUrl; |
|
108 | 108 | $this->logger = new Logger(); |
109 | 109 | } |
110 | 110 | |
@@ -164,17 +164,17 @@ discard block |
||
164 | 164 | |
165 | 165 | /** @var \SimpleXMLElement $value */ |
166 | 166 | foreach ($item as $key => $value) { |
167 | - $attributes = (array)$value->attributes(); |
|
167 | + $attributes = (array) $value->attributes(); |
|
168 | 168 | |
169 | 169 | if (!empty($attributes) && isset($attributes['@attributes'])) { |
170 | 170 | $return[$key]['@attributes'] = $attributes['@attributes']; |
171 | 171 | } |
172 | 172 | |
173 | 173 | // empty |
174 | - if (isset($value['nil']) && (string)$value['nil'] === 'true') { |
|
174 | + if (isset($value['nil']) && (string) $value['nil'] === 'true') { |
|
175 | 175 | $return[$key] = null; |
176 | 176 | } // empty |
177 | - elseif (isset($value[0]) && (string)$value == '') { |
|
177 | + elseif (isset($value[0]) && (string) $value == '') { |
|
178 | 178 | if (in_array($key, $arrayKeys)) { |
179 | 179 | $return[$key][] = self::decodeResponse($value); |
180 | 180 | } else { |
@@ -183,18 +183,18 @@ discard block |
||
183 | 183 | } else { |
184 | 184 | // arrays |
185 | 185 | if (in_array($key, $arrayKeys)) { |
186 | - $return[$key][] = (string)$value; |
|
186 | + $return[$key][] = (string) $value; |
|
187 | 187 | } // booleans |
188 | - elseif ((string)$value == 'true') { |
|
188 | + elseif ((string) $value == 'true') { |
|
189 | 189 | $return[$key] = true; |
190 | - } elseif ((string)$value == 'false') { |
|
190 | + } elseif ((string) $value == 'false') { |
|
191 | 191 | $return[$key] = false; |
192 | 192 | } // integers |
193 | 193 | elseif (in_array($key, $integerKeys)) { |
194 | - $return[$key] = (int)$value; |
|
194 | + $return[$key] = (int) $value; |
|
195 | 195 | } // fallback to string |
196 | 196 | else { |
197 | - $return[$key] = (string)$value; |
|
197 | + $return[$key] = (string) $value; |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | } |
@@ -218,16 +218,16 @@ discard block |
||
218 | 218 | private function doCall($url, $body = null, $headers = array(), $method = 'GET', $expectXML = true) |
219 | 219 | { |
220 | 220 | // build Authorization header |
221 | - $headers[] = 'Authorization: Basic ' . $this->getAuthorizationHeader(); |
|
221 | + $headers[] = 'Authorization: Basic '.$this->getAuthorizationHeader(); |
|
222 | 222 | |
223 | 223 | // set options |
224 | - $options[CURLOPT_URL] = $this->apiUrl . '/' . $this->accountId . $url; |
|
224 | + $options[CURLOPT_URL] = $this->apiUrl.'/'.$this->accountId.$url; |
|
225 | 225 | if ($this->getPort() != 0) { |
226 | 226 | $options[CURLOPT_PORT] = $this->getPort(); |
227 | 227 | } |
228 | 228 | $options[CURLOPT_USERAGENT] = $this->getUserAgent(); |
229 | 229 | $options[CURLOPT_RETURNTRANSFER] = true; |
230 | - $options[CURLOPT_TIMEOUT] = (int)$this->getTimeOut(); |
|
230 | + $options[CURLOPT_TIMEOUT] = (int) $this->getTimeOut(); |
|
231 | 231 | $options[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; |
232 | 232 | $options[CURLOPT_HTTPHEADER] = $headers; |
233 | 233 | |
@@ -251,8 +251,8 @@ discard block |
||
251 | 251 | if ($xml !== false && (substr($xml->getName(), 0, 7) == 'invalid') |
252 | 252 | ) { |
253 | 253 | // message |
254 | - $message = (string)$xml->error; |
|
255 | - $code = isset($xml->code) ? (int)$xml->code : null; |
|
254 | + $message = (string) $xml->error; |
|
255 | + $code = isset($xml->code) ? (int) $xml->code : null; |
|
256 | 256 | |
257 | 257 | // throw exception |
258 | 258 | throw new BpostInvalidSelectionException($message, $code); |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | */ |
299 | 299 | private function getAuthorizationHeader() |
300 | 300 | { |
301 | - return base64_encode($this->accountId . ':' . $this->passPhrase); |
|
301 | + return base64_encode($this->accountId.':'.$this->passPhrase); |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | /** |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | */ |
319 | 319 | public function getPort() |
320 | 320 | { |
321 | - return (int)$this->port; |
|
321 | + return (int) $this->port; |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | /** |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | */ |
329 | 329 | public function getTimeOut() |
330 | 330 | { |
331 | - return (int)$this->timeOut; |
|
331 | + return (int) $this->timeOut; |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | /** |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | */ |
341 | 341 | public function getUserAgent() |
342 | 342 | { |
343 | - return (string)'PHP Bpost/' . self::VERSION . ' ' . $this->userAgent; |
|
343 | + return (string) 'PHP Bpost/'.self::VERSION.' '.$this->userAgent; |
|
344 | 344 | } |
345 | 345 | |
346 | 346 | /** |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | */ |
352 | 352 | public function setTimeOut($seconds) |
353 | 353 | { |
354 | - $this->timeOut = (int)$seconds; |
|
354 | + $this->timeOut = (int) $seconds; |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | /** |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | */ |
363 | 363 | public function setUserAgent($userAgent) |
364 | 364 | { |
365 | - $this->userAgent = (string)$userAgent; |
|
365 | + $this->userAgent = (string) $userAgent; |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | // webservice methods |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | */ |
421 | 421 | public function fetchOrder($reference) |
422 | 422 | { |
423 | - $url = '/orders/' . (string)$reference; |
|
423 | + $url = '/orders/'.(string) $reference; |
|
424 | 424 | |
425 | 425 | $headers = array( |
426 | 426 | 'Accept: application/vnd.bpost.shm-order-v3.3+XML', |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | throw new BpostInvalidValueException('status', $status, Box::getPossibleStatusValues()); |
479 | 479 | } |
480 | 480 | |
481 | - $url = '/orders/' . $reference; |
|
481 | + $url = '/orders/'.$reference; |
|
482 | 482 | |
483 | 483 | $document = new \DOMDocument('1.0', 'utf-8'); |
484 | 484 | $document->preserveWhiteSpace = false; |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | throw new BpostInvalidValueException('format', $format, self::getPossibleLabelFormatValues()); |
543 | 543 | } |
544 | 544 | |
545 | - $url .= '/labels/' . $format; |
|
545 | + $url .= '/labels/'.$format; |
|
546 | 546 | if ($withReturnLabels) { |
547 | 547 | $url .= '/withReturnLabels'; |
548 | 548 | } |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | $withReturnLabels = false, |
587 | 587 | $asPdf = false |
588 | 588 | ) { |
589 | - $url = '/orders/' . (string)$reference; |
|
589 | + $url = '/orders/'.(string) $reference; |
|
590 | 590 | |
591 | 591 | return $this->getLabel($url, $format, $withReturnLabels, $asPdf); |
592 | 592 | } |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | $withReturnLabels = false, |
609 | 609 | $asPdf = false |
610 | 610 | ) { |
611 | - $url = '/boxes/' . (string)$barcode; |
|
611 | + $url = '/boxes/'.(string) $barcode; |
|
612 | 612 | |
613 | 613 | return $this->getLabel($url, $format, $withReturnLabels, $asPdf); |
614 | 614 | } |
@@ -173,7 +173,7 @@ |
||
173 | 173 | } |
174 | 174 | |
175 | 175 | /** |
176 | - * @return array |
|
176 | + * @return string[] |
|
177 | 177 | */ |
178 | 178 | public static function getPossibleStatusValues() |
179 | 179 | { |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function setAdditionalCustomerReference($additionalCustomerReference) |
163 | 163 | { |
164 | - $this->additionalCustomerReference = (string)$additionalCustomerReference; |
|
164 | + $this->additionalCustomerReference = (string) $additionalCustomerReference; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | { |
203 | 203 | $tagName = 'box'; |
204 | 204 | if ($prefix !== null) { |
205 | - $tagName = $prefix . ':' . $tagName; |
|
205 | + $tagName = $prefix.':'.$tagName; |
|
206 | 206 | } |
207 | 207 | |
208 | 208 | $box = $document->createElement($tagName); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | if ($this->getRemark() !== null) { |
226 | 226 | $tagName = 'remark'; |
227 | 227 | if ($prefix !== null) { |
228 | - $tagName = $prefix . ':' . $tagName; |
|
228 | + $tagName = $prefix.':'.$tagName; |
|
229 | 229 | } |
230 | 230 | $box->appendChild( |
231 | 231 | $document->createElement( |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | if ($this->getAdditionalCustomerReference() !== null) { |
238 | 238 | $tagName = 'additionalCustomerReference'; |
239 | 239 | if ($prefix !== null) { |
240 | - $tagName = $prefix . ':' . $tagName; |
|
240 | + $tagName = $prefix.':'.$tagName; |
|
241 | 241 | } |
242 | 242 | $box->appendChild( |
243 | 243 | $document->createElement( |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | if ($this->getBarcode() !== null) { |
250 | 250 | $tagName = 'barcode'; |
251 | 251 | if ($prefix !== null) { |
252 | - $tagName = $prefix . ':' . $tagName; |
|
252 | + $tagName = $prefix.':'.$tagName; |
|
253 | 253 | } |
254 | 254 | $box->appendChild( |
255 | 255 | $document->createElement( |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | $nationalBoxData = $xml->nationalBox->children('http://schema.post.be/shm/deepintegration/v3/national'); |
287 | 287 | |
288 | 288 | // build classname based on the tag name |
289 | - $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\' . ucfirst($nationalBoxData->getName()); |
|
289 | + $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\'.ucfirst($nationalBoxData->getName()); |
|
290 | 290 | if ($nationalBoxData->getName() == 'at24-7') { |
291 | 291 | $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\At247'; |
292 | 292 | } |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | $internationalBoxData = $xml->internationalBox->children('http://schema.post.be/shm/deepintegration/v3/international'); |
308 | 308 | |
309 | 309 | // build classname based on the tag name |
310 | - $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\' . ucfirst($internationalBoxData->getName()); |
|
310 | + $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\'.ucfirst($internationalBoxData->getName()); |
|
311 | 311 | |
312 | 312 | if (!method_exists($className, 'createFromXML')) { |
313 | 313 | var_dump($className); |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | $box->setRemark((string) $xml->remark); |
326 | 326 | } |
327 | 327 | if (isset($xml->additionalCustomerReference) && $xml->additionalCustomerReference != '') { |
328 | - $box->setAdditionalCustomerReference((string)$xml->additionalCustomerReference); |
|
328 | + $box->setAdditionalCustomerReference((string) $xml->additionalCustomerReference); |
|
329 | 329 | } |
330 | 330 | if (!empty($xml->barcode)) { |
331 | 331 | $box->setBarcode((string) $xml->barcode); |
@@ -239,6 +239,9 @@ |
||
239 | 239 | } |
240 | 240 | } |
241 | 241 | |
242 | + /** |
|
243 | + * @param string|null $prefix |
|
244 | + */ |
|
242 | 245 | private function addToXmlShopHandlingInstruction(\DOMDocument $document, \DOMElement $typeElement, $prefix) |
243 | 246 | { |
244 | 247 | if ($this->getShopHandlingInstruction() !== null) { |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | |
262 | 262 | if (isset($xml->atBpost->product) && $xml->atBpost->product != '') { |
263 | 263 | $atBpost->setProduct( |
264 | - (string)$xml->atBpost->product |
|
264 | + (string) $xml->atBpost->product |
|
265 | 265 | ); |
266 | 266 | } |
267 | 267 | if (isset($xml->atBpost->options)) { |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | ) { |
282 | 282 | $option = Messaging::createFromXML($optionData); |
283 | 283 | } else { |
284 | - $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\' . ucfirst($optionData->getName()); |
|
284 | + $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\'.ucfirst($optionData->getName()); |
|
285 | 285 | if (!method_exists($className, 'createFromXML')) { |
286 | 286 | throw new BpostNotImplementedException(); |
287 | 287 | } |
@@ -296,27 +296,27 @@ discard block |
||
296 | 296 | } |
297 | 297 | if (isset($xml->atBpost->weight) && $xml->atBpost->weight != '') { |
298 | 298 | $atBpost->setWeight( |
299 | - (int)$xml->atBpost->weight |
|
299 | + (int) $xml->atBpost->weight |
|
300 | 300 | ); |
301 | 301 | } |
302 | 302 | if (isset($xml->atBpost->receiverName) && $xml->atBpost->receiverName != '') { |
303 | 303 | $atBpost->setReceiverName( |
304 | - (string)$xml->atBpost->receiverName |
|
304 | + (string) $xml->atBpost->receiverName |
|
305 | 305 | ); |
306 | 306 | } |
307 | 307 | if (isset($xml->atBpost->receiverCompany) && $xml->atBpost->receiverCompany != '') { |
308 | 308 | $atBpost->setReceiverCompany( |
309 | - (string)$xml->atBpost->receiverCompany |
|
309 | + (string) $xml->atBpost->receiverCompany |
|
310 | 310 | ); |
311 | 311 | } |
312 | 312 | if (isset($xml->atBpost->pugoId) && $xml->atBpost->pugoId != '') { |
313 | 313 | $atBpost->setPugoId( |
314 | - (string)$xml->atBpost->pugoId |
|
314 | + (string) $xml->atBpost->pugoId |
|
315 | 315 | ); |
316 | 316 | } |
317 | 317 | if (isset($xml->atBpost->pugoName) && $xml->atBpost->pugoName != '') { |
318 | 318 | $atBpost->setPugoName( |
319 | - (string)$xml->atBpost->pugoName |
|
319 | + (string) $xml->atBpost->pugoName |
|
320 | 320 | ); |
321 | 321 | } |
322 | 322 | if (isset($xml->atBpost->pugoAddress)) { |
@@ -330,12 +330,12 @@ discard block |
||
330 | 330 | } |
331 | 331 | if (isset($xml->atBpost->requestedDeliveryDate) && $xml->atBpost->requestedDeliveryDate != '') { |
332 | 332 | $atBpost->setRequestedDeliveryDate( |
333 | - (string)$xml->atBpost->requestedDeliveryDate |
|
333 | + (string) $xml->atBpost->requestedDeliveryDate |
|
334 | 334 | ); |
335 | 335 | } |
336 | 336 | if (isset($xml->atBpost->shopHandlingInstruction) && $xml->atBpost->shopHandlingInstruction != '') { |
337 | 337 | $atBpost->setShopHandlingInstruction( |
338 | - (string)$xml->atBpost->shopHandlingInstruction |
|
338 | + (string) $xml->atBpost->shopHandlingInstruction |
|
339 | 339 | ); |
340 | 340 | } |
341 | 341 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | /** |
25 | 25 | * @todo Implement it, because today, nothing is specified |
26 | 26 | * @param \SimpleXMLElement $xml |
27 | - * @return ParcelLockerReducedMobilityZone|\Bpost\BpostApiClient\IComplexAttribute |
|
27 | + * @return ParcelLockerReducedMobilityZone |
|
28 | 28 | */ |
29 | 29 | static function createFromXml(\SimpleXMLElement $xml) |
30 | 30 | { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
112 | - * @param array $closedFrom |
|
112 | + * @param string $closedFrom |
|
113 | 113 | */ |
114 | 114 | public function setClosedFrom($closedFrom) |
115 | 115 | { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
128 | - * @param array $closedTo |
|
128 | + * @param string $closedTo |
|
129 | 129 | */ |
130 | 130 | public function setClosedTo($closedTo) |
131 | 131 | { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function setCity($city) |
72 | 72 | { |
73 | - $this->city = (string)$city; |
|
73 | + $this->city = (string) $city; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function addHour($index, Day $day) |
121 | 121 | { |
122 | - $this->hours[(int)$index] = $day; |
|
122 | + $this->hours[(int) $index] = $day; |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function setId($id) |
145 | 145 | { |
146 | - $this->id = (string)$id; |
|
146 | + $this->id = (string) $id; |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | public function setLatitude($latitude) |
161 | 161 | { |
162 | - $this->latitude = (float)$latitude; |
|
162 | + $this->latitude = (float) $latitude; |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | */ |
176 | 176 | public function setLongitude($longitude) |
177 | 177 | { |
178 | - $this->longitude = (float)$longitude; |
|
178 | + $this->longitude = (float) $longitude; |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | public function setNote($note) |
193 | 193 | { |
194 | - $this->note = (string)$note; |
|
194 | + $this->note = (string) $note; |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | */ |
208 | 208 | public function setNr($nr) |
209 | 209 | { |
210 | - $this->nr = (string)$nr; |
|
210 | + $this->nr = (string) $nr; |
|
211 | 211 | } |
212 | 212 | |
213 | 213 | /** |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | */ |
224 | 224 | public function setOffice($office) |
225 | 225 | { |
226 | - $this->office = (string)$office; |
|
226 | + $this->office = (string) $office; |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | /** |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | */ |
264 | 264 | public function setStreet($street) |
265 | 265 | { |
266 | - $this->street = (string)$street; |
|
266 | + $this->street = (string) $street; |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | /** |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | */ |
280 | 280 | public function setType($type) |
281 | 281 | { |
282 | - $this->type = (string)$type; |
|
282 | + $this->type = (string) $type; |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | /** |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | */ |
296 | 296 | public function setX($x) |
297 | 297 | { |
298 | - $this->x = (int)$x; |
|
298 | + $this->x = (int) $x; |
|
299 | 299 | } |
300 | 300 | |
301 | 301 | /** |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | */ |
312 | 312 | public function setY($y) |
313 | 313 | { |
314 | - $this->y = (int)$y; |
|
314 | + $this->y = (int) $y; |
|
315 | 315 | } |
316 | 316 | |
317 | 317 | /** |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | */ |
328 | 328 | public function setZip($zip) |
329 | 329 | { |
330 | - $this->zip = (string)$zip; |
|
330 | + $this->zip = (string) $zip; |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | /** |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | */ |
352 | 352 | public function setPage($page) |
353 | 353 | { |
354 | - $this->page = (string)$page; |
|
354 | + $this->page = (string) $page; |
|
355 | 355 | } |
356 | 356 | |
357 | 357 | |
@@ -373,55 +373,55 @@ discard block |
||
373 | 373 | $poi = new Poi(); |
374 | 374 | |
375 | 375 | if (isset($recordXml->Id) && $recordXml->Id != '') { |
376 | - $poi->setId((string)$recordXml->Id); |
|
376 | + $poi->setId((string) $recordXml->Id); |
|
377 | 377 | } |
378 | 378 | if (isset($recordXml->ID) && $recordXml->ID != '') { |
379 | - $poi->setId((string)$recordXml->ID); |
|
379 | + $poi->setId((string) $recordXml->ID); |
|
380 | 380 | } |
381 | 381 | if (isset($recordXml->Type) && $recordXml->Type != '') { |
382 | - $poi->setType((string)$recordXml->Type); |
|
382 | + $poi->setType((string) $recordXml->Type); |
|
383 | 383 | } |
384 | 384 | if (isset($recordXml->Name) && $recordXml->Name != '') { |
385 | - $poi->setOffice((string)$recordXml->Name); |
|
385 | + $poi->setOffice((string) $recordXml->Name); |
|
386 | 386 | } |
387 | 387 | if (isset($recordXml->OFFICE) && $recordXml->OFFICE != '') { |
388 | - $poi->setOffice((string)$recordXml->OFFICE); |
|
388 | + $poi->setOffice((string) $recordXml->OFFICE); |
|
389 | 389 | } |
390 | 390 | if (isset($recordXml->Street) && $recordXml->Street != '') { |
391 | - $poi->setStreet((string)$recordXml->Street); |
|
391 | + $poi->setStreet((string) $recordXml->Street); |
|
392 | 392 | } |
393 | 393 | if (isset($recordXml->STREET) && $recordXml->STREET != '') { |
394 | - $poi->setStreet((string)$recordXml->STREET); |
|
394 | + $poi->setStreet((string) $recordXml->STREET); |
|
395 | 395 | } |
396 | 396 | if (isset($recordXml->Number) && $recordXml->Number != '') { |
397 | - $poi->setNr((string)$recordXml->Number); |
|
397 | + $poi->setNr((string) $recordXml->Number); |
|
398 | 398 | } |
399 | 399 | if (isset($recordXml->NR) && $recordXml->NR != '') { |
400 | - $poi->setNr((string)$recordXml->NR); |
|
400 | + $poi->setNr((string) $recordXml->NR); |
|
401 | 401 | } |
402 | 402 | if (isset($recordXml->Zip) && $recordXml->Zip != '') { |
403 | - $poi->setZip((string)$recordXml->Zip); |
|
403 | + $poi->setZip((string) $recordXml->Zip); |
|
404 | 404 | } |
405 | 405 | if (isset($recordXml->ZIP) && $recordXml->ZIP != '') { |
406 | - $poi->setZip((string)$recordXml->ZIP); |
|
406 | + $poi->setZip((string) $recordXml->ZIP); |
|
407 | 407 | } |
408 | 408 | if (isset($recordXml->City) && $recordXml->City != '') { |
409 | - $poi->setCity((string)$recordXml->City); |
|
409 | + $poi->setCity((string) $recordXml->City); |
|
410 | 410 | } |
411 | 411 | if (isset($recordXml->CITY) && $recordXml->CITY != '') { |
412 | - $poi->setCity((string)$recordXml->CITY); |
|
412 | + $poi->setCity((string) $recordXml->CITY); |
|
413 | 413 | } |
414 | 414 | if (isset($recordXml->X) && $recordXml->X != '') { |
415 | - $poi->setX((int)$recordXml->X); |
|
415 | + $poi->setX((int) $recordXml->X); |
|
416 | 416 | } |
417 | 417 | if (isset($recordXml->Y) && $recordXml->Y != '') { |
418 | - $poi->setY((int)$recordXml->Y); |
|
418 | + $poi->setY((int) $recordXml->Y); |
|
419 | 419 | } |
420 | 420 | if (isset($recordXml->Longitude) && $recordXml->Longitude != '') { |
421 | - $poi->setLongitude((float)$recordXml->Longitude); |
|
421 | + $poi->setLongitude((float) $recordXml->Longitude); |
|
422 | 422 | } |
423 | 423 | if (isset($recordXml->Latitude) && $recordXml->Latitude != '') { |
424 | - $poi->setLatitude((float)$recordXml->Latitude); |
|
424 | + $poi->setLatitude((float) $recordXml->Latitude); |
|
425 | 425 | } |
426 | 426 | if (isset($recordXml->Services) && isset($recordXml->Services->Service)) { |
427 | 427 | foreach ($recordXml->Services->Service as $service) { |
@@ -456,13 +456,13 @@ discard block |
||
456 | 456 | } |
457 | 457 | |
458 | 458 | if (isset($recordXml->ClosedFrom) && $recordXml->ClosedFrom != '') { |
459 | - $poi->setClosedFrom((string)$recordXml->ClosedFrom); |
|
459 | + $poi->setClosedFrom((string) $recordXml->ClosedFrom); |
|
460 | 460 | } |
461 | 461 | if (isset($recordXml->ClosedTo) && $recordXml->ClosedTo != '') { |
462 | - $poi->setClosedTo((string)$recordXml->ClosedTo); |
|
462 | + $poi->setClosedTo((string) $recordXml->ClosedTo); |
|
463 | 463 | } |
464 | 464 | if (isset($recordXml->NOTE) && $recordXml->NOTE != '') { |
465 | - $poi->setNote((string)$recordXml->NOTE); |
|
465 | + $poi->setNote((string) $recordXml->NOTE); |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | if (isset($xml->Page) && isset($xml->Page['ServiceRef']) && $xml->Page['ServiceRef'] != '') { |
@@ -162,15 +162,15 @@ |
||
162 | 162 | $self = new self(); |
163 | 163 | |
164 | 164 | if (isset($xml->language) && $xml->language != '') { |
165 | - $self->setLanguage((string)$xml->language); |
|
165 | + $self->setLanguage((string) $xml->language); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | if (isset($xml->mobilePhone) && $xml->mobilePhone != '') { |
169 | - $self->setMobilePhone((string)$xml->mobilePhone); |
|
169 | + $self->setMobilePhone((string) $xml->mobilePhone); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | if (isset($xml->emailAddress) && $xml->emailAddress != '') { |
173 | - $self->setEmailAddress((string)$xml->emailAddress); |
|
173 | + $self->setEmailAddress((string) $xml->emailAddress); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | if (isset($xml->parcelLockerReducedMobilityZone)) { |
@@ -80,7 +80,7 @@ |
||
80 | 80 | */ |
81 | 81 | public function setRequestedDeliveryDate($requestedDeliveryDate) |
82 | 82 | { |
83 | - $this->requestedDeliveryDate = (string)$requestedDeliveryDate; |
|
83 | + $this->requestedDeliveryDate = (string) $requestedDeliveryDate; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function setInNetworkCutOff($inNetworkCutOff) |
47 | 47 | { |
48 | - $this->inNetworkCutOff = (string)$inNetworkCutOff; |
|
48 | + $this->inNetworkCutOff = (string) $inNetworkCutOff; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | if (isset($bpostOnAppointmentXml->inNetworkCutOff) && $bpostOnAppointmentXml->inNetworkCutOff != '') { |
126 | 126 | $self->setInNetworkCutOff( |
127 | - (string)$bpostOnAppointmentXml->inNetworkCutOff |
|
127 | + (string) $bpostOnAppointmentXml->inNetworkCutOff |
|
128 | 128 | ); |
129 | 129 | } |
130 | 130 |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function setName($name) |
67 | 67 | { |
68 | - $this->name = (string)$name; |
|
68 | + $this->name = (string) $name; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | public function setVisibility($visibility) |
94 | 94 | { |
95 | - $this->visibility = (string)$visibility; |
|
95 | + $this->visibility = (string) $visibility; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |