@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | public function setBarcode($barcode) |
| 28 | 28 | { |
| 29 | - $this->barcode = (string)$barcode; |
|
| 29 | + $this->barcode = (string) $barcode; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -62,10 +62,10 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $self = new self(); |
| 64 | 64 | if (isset($xml->barcode) && $xml->barcode != '') { |
| 65 | - $self->setBarcode((string)$xml->barcode); |
|
| 65 | + $self->setBarcode((string) $xml->barcode); |
|
| 66 | 66 | } |
| 67 | 67 | if (isset($xml->reference) && $xml->reference != '') { |
| 68 | - $self->setReference((string)$xml->reference); |
|
| 68 | + $self->setReference((string) $xml->reference); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | return $self; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function setProduct($product) |
| 134 | 134 | { |
| 135 | - if ( ! in_array($product, self::getPossibleProductValues())) { |
|
| 135 | + if (!in_array($product, self::getPossibleProductValues())) { |
|
| 136 | 136 | throw new BpostInvalidValueException('product', $product, self::getPossibleProductValues()); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | */ |
| 196 | 196 | public function setRequestedDeliveryDate($requestedDeliveryDate) |
| 197 | 197 | { |
| 198 | - $this->requestedDeliveryDate = (string)$requestedDeliveryDate; |
|
| 198 | + $this->requestedDeliveryDate = (string) $requestedDeliveryDate; |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | /** |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | { |
| 212 | 212 | $tagName = 'nationalBox'; |
| 213 | 213 | if ($prefix !== null) { |
| 214 | - $tagName = $prefix . ':' . $tagName; |
|
| 214 | + $tagName = $prefix.':'.$tagName; |
|
| 215 | 215 | } |
| 216 | 216 | $nationalElement = $document->createElement($tagName); |
| 217 | 217 | $boxElement = parent::toXML($document, null, 'at24-7'); |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | |
| 310 | 310 | if (isset($xml->{'at24-7'}->product) && $xml->{'at24-7'}->product != '') { |
| 311 | 311 | $at247->setProduct( |
| 312 | - (string)$xml->{'at24-7'}->product |
|
| 312 | + (string) $xml->{'at24-7'}->product |
|
| 313 | 313 | ); |
| 314 | 314 | } |
| 315 | 315 | if (isset($xml->{'at24-7'}->options)) { |
@@ -320,8 +320,8 @@ discard block |
||
| 320 | 320 | if (in_array($optionData->getName(), array(Messaging::MESSAGING_TYPE_INFO_DISTRIBUTED))) { |
| 321 | 321 | $option = Messaging::createFromXML($optionData); |
| 322 | 322 | } else { |
| 323 | - $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\' . ucfirst($optionData->getName()); |
|
| 324 | - if ( ! method_exists($className, 'createFromXML')) { |
|
| 323 | + $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\'.ucfirst($optionData->getName()); |
|
| 324 | + if (!method_exists($className, 'createFromXML')) { |
|
| 325 | 325 | throw new BpostNotImplementedException(); |
| 326 | 326 | } |
| 327 | 327 | $option = call_user_func( |
@@ -335,32 +335,32 @@ discard block |
||
| 335 | 335 | } |
| 336 | 336 | if (isset($xml->{'at24-7'}->weight) && $xml->{'at24-7'}->weight != '') { |
| 337 | 337 | $at247->setWeight( |
| 338 | - (int)$xml->{'at24-7'}->weight |
|
| 338 | + (int) $xml->{'at24-7'}->weight |
|
| 339 | 339 | ); |
| 340 | 340 | } |
| 341 | 341 | if (isset($xml->{'at24-7'}->memberId) && $xml->{'at24-7'}->memberId != '') { |
| 342 | 342 | $at247->setMemberId( |
| 343 | - (string)$xml->{'at24-7'}->memberId |
|
| 343 | + (string) $xml->{'at24-7'}->memberId |
|
| 344 | 344 | ); |
| 345 | 345 | } |
| 346 | 346 | if (isset($xml->{'at24-7'}->receiverName) && $xml->{'at24-7'}->receiverName != '') { |
| 347 | 347 | $at247->setReceiverName( |
| 348 | - (string)$xml->{'at24-7'}->receiverName |
|
| 348 | + (string) $xml->{'at24-7'}->receiverName |
|
| 349 | 349 | ); |
| 350 | 350 | } |
| 351 | 351 | if (isset($xml->{'at24-7'}->receiverCompany) && $xml->{'at24-7'}->receiverCompany != '') { |
| 352 | 352 | $at247->setReceiverCompany( |
| 353 | - (string)$xml->{'at24-7'}->receiverCompany |
|
| 353 | + (string) $xml->{'at24-7'}->receiverCompany |
|
| 354 | 354 | ); |
| 355 | 355 | } |
| 356 | 356 | if (isset($xml->{'at24-7'}->parcelsDepotId) && $xml->{'at24-7'}->parcelsDepotId != '') { |
| 357 | 357 | $at247->setParcelsDepotId( |
| 358 | - (string)$xml->{'at24-7'}->parcelsDepotId |
|
| 358 | + (string) $xml->{'at24-7'}->parcelsDepotId |
|
| 359 | 359 | ); |
| 360 | 360 | } |
| 361 | 361 | if (isset($xml->{'at24-7'}->parcelsDepotName) && $xml->{'at24-7'}->parcelsDepotName != '') { |
| 362 | 362 | $at247->setParcelsDepotName( |
| 363 | - (string)$xml->{'at24-7'}->parcelsDepotName |
|
| 363 | + (string) $xml->{'at24-7'}->parcelsDepotName |
|
| 364 | 364 | ); |
| 365 | 365 | } |
| 366 | 366 | if (isset($xml->{'at24-7'}->parcelsDepotAddress)) { |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | } |
| 375 | 375 | if (isset($xml->{'at24-7'}->requestedDeliveryDate) && $xml->{'at24-7'}->requestedDeliveryDate != '') { |
| 376 | 376 | $at247->setRequestedDeliveryDate( |
| 377 | - (string)$xml->{'at24-7'}->requestedDeliveryDate |
|
| 377 | + (string) $xml->{'at24-7'}->requestedDeliveryDate |
|
| 378 | 378 | ); |
| 379 | 379 | } |
| 380 | 380 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | public function getUrl(LabelFormat $format, $withReturnLabels, $forcePrinting = false) |
| 52 | 52 | { |
| 53 | 53 | return '/labels/' . $format->getValue() |
| 54 | - . ($withReturnLabels ? '/withReturnLabels' : '') |
|
| 55 | - . ($forcePrinting ? '?forcePrinting=true' : ''); |
|
| 54 | + . ($withReturnLabels ? '/withReturnLabels' : '') |
|
| 55 | + . ($forcePrinting ? '?forcePrinting=true' : ''); |
|
| 56 | 56 | } |
| 57 | 57 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public function getHeaders($asPdf) |
| 39 | 39 | { |
| 40 | 40 | return array( |
| 41 | - 'Accept: application/vnd.bpost.shm-label-' . ($asPdf ? 'pdf' : 'image') . '-v3+XML', |
|
| 41 | + 'Accept: application/vnd.bpost.shm-label-'.($asPdf ? 'pdf' : 'image').'-v3+XML', |
|
| 42 | 42 | 'Content-Type: application/vnd.bpost.shm-labelRequest-v3+XML', |
| 43 | 43 | ); |
| 44 | 44 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function getUrl(LabelFormat $format, $withReturnLabels, $forcePrinting = false) |
| 52 | 52 | { |
| 53 | - return '/labels/' . $format->getValue() |
|
| 53 | + return '/labels/'.$format->getValue() |
|
| 54 | 54 | . ($withReturnLabels ? '/withReturnLabels' : '') |
| 55 | 55 | . ($forcePrinting ? '?forcePrinting=true' : ''); |
| 56 | 56 | } |