@@ -101,7 +101,7 @@ |
||
| 101 | 101 | */ |
| 102 | 102 | public function output() |
| 103 | 103 | { |
| 104 | - header('Content-type: ' . $this->getMimeType()); |
|
| 104 | + header('Content-type: '.$this->getMimeType()); |
|
| 105 | 105 | echo $this->getBytes(); |
| 106 | 106 | exit; |
| 107 | 107 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | { |
| 162 | 162 | $tagName = 'internationalBox'; |
| 163 | 163 | if ($prefix !== null) { |
| 164 | - $tagName = $prefix . ':' . $tagName; |
|
| 164 | + $tagName = $prefix.':'.$tagName; |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | $internationalBox = $document->createElement($tagName); |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | if (in_array($optionData->getName(), array(Messaging::MESSAGING_TYPE_INFO_DISTRIBUTED))) { |
| 237 | 237 | $option = Messaging::createFromXML($optionData); |
| 238 | 238 | } else { |
| 239 | - $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\' . ucfirst($optionData->getName()); |
|
| 239 | + $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\'.ucfirst($optionData->getName()); |
|
| 240 | 240 | if (!method_exists($className, 'createFromXML')) { |
| 241 | 241 | throw new BpostNotImplementedException(); |
| 242 | 242 | } |
@@ -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 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | $tagName = 'cod'; |
| 99 | 99 | if ($prefix !== null) { |
| 100 | - $tagName = $prefix . ':' . $tagName; |
|
| 100 | + $tagName = $prefix.':'.$tagName; |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | $cod = $document->createElement($tagName); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | if ($this->getAmount() !== null) { |
| 106 | 106 | $tagName = 'codAmount'; |
| 107 | 107 | if ($prefix !== null) { |
| 108 | - $tagName = $prefix . ':' . $tagName; |
|
| 108 | + $tagName = $prefix.':'.$tagName; |
|
| 109 | 109 | } |
| 110 | 110 | $cod->appendChild( |
| 111 | 111 | $document->createElement( |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | if ($this->getIban() !== null) { |
| 118 | 118 | $tagName = 'iban'; |
| 119 | 119 | if ($prefix !== null) { |
| 120 | - $tagName = $prefix . ':' . $tagName; |
|
| 120 | + $tagName = $prefix.':'.$tagName; |
|
| 121 | 121 | } |
| 122 | 122 | $cod->appendChild( |
| 123 | 123 | $document->createElement( |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | if ($this->getBic() !== null) { |
| 130 | 130 | $tagName = 'bic'; |
| 131 | 131 | if ($prefix !== null) { |
| 132 | - $tagName = $prefix . ':' . $tagName; |
|
| 132 | + $tagName = $prefix.':'.$tagName; |
|
| 133 | 133 | } |
| 134 | 134 | $cod->appendChild( |
| 135 | 135 | $document->createElement( |
@@ -136,13 +136,13 @@ |
||
| 136 | 136 | { |
| 137 | 137 | $tagName = 'insured'; |
| 138 | 138 | if ($prefix !== null) { |
| 139 | - $tagName = $prefix . ':' . $tagName; |
|
| 139 | + $tagName = $prefix.':'.$tagName; |
|
| 140 | 140 | } |
| 141 | 141 | $insured = $document->createElement($tagName); |
| 142 | 142 | |
| 143 | 143 | $tagName = $this->getType(); |
| 144 | 144 | if ($prefix !== null) { |
| 145 | - $tagName = $prefix . ':' . $tagName; |
|
| 145 | + $tagName = $prefix.':'.$tagName; |
|
| 146 | 146 | } |
| 147 | 147 | $insurance = $document->createElement($tagName); |
| 148 | 148 | $insured->appendChild($insurance); |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | if ($this->getProduct() !== null) { |
| 154 | 154 | $tagName = 'product'; |
| 155 | 155 | if ($prefix !== null) { |
| 156 | - $tagName = $prefix . ':' . $tagName; |
|
| 156 | + $tagName = $prefix.':'.$tagName; |
|
| 157 | 157 | } |
| 158 | 158 | $typeElement->appendChild( |
| 159 | 159 | $document->createElement( |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | |
| 221 | 221 | if (isset($nationalXml->product) && $nationalXml->product != '') { |
| 222 | 222 | $self->setProduct( |
| 223 | - (string)$nationalXml->product |
|
| 223 | + (string) $nationalXml->product |
|
| 224 | 224 | ); |
| 225 | 225 | } |
| 226 | 226 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | ) { |
| 239 | 239 | $option = Messaging::createFromXML($optionData); |
| 240 | 240 | } else { |
| 241 | - $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\' . ucfirst($optionData->getName()); |
|
| 241 | + $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\'.ucfirst($optionData->getName()); |
|
| 242 | 242 | if (!method_exists($className, 'createFromXML')) { |
| 243 | 243 | throw new BpostXmlInvalidItemException(); |
| 244 | 244 | } |
@@ -254,19 +254,19 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | if (isset($nationalXml->weight) && $nationalXml->weight != '') { |
| 256 | 256 | $self->setWeight( |
| 257 | - (int)$nationalXml->weight |
|
| 257 | + (int) $nationalXml->weight |
|
| 258 | 258 | ); |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | if (isset($nationalXml->openingHours) && $nationalXml->openingHours != '') { |
| 262 | 262 | foreach ($nationalXml->openingHours->children() as $day => $value) { |
| 263 | - $self->addOpeningHour(new Day($day, (string)$value)); |
|
| 263 | + $self->addOpeningHour(new Day($day, (string) $value)); |
|
| 264 | 264 | } |
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | if (isset($nationalXml->desiredDeliveryPlace) && $nationalXml->desiredDeliveryPlace != '') { |
| 268 | 268 | $self->setDesiredDeliveryPlace( |
| 269 | - (string)$nationalXml->desiredDeliveryPlace |
|
| 269 | + (string) $nationalXml->desiredDeliveryPlace |
|
| 270 | 270 | ); |
| 271 | 271 | } |
| 272 | 272 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | if ($this->getStreetName() !== null) { |
| 223 | 223 | $tagName = 'streetName'; |
| 224 | 224 | if ($prefix !== null) { |
| 225 | - $tagName = $prefix . ':' . $tagName; |
|
| 225 | + $tagName = $prefix.':'.$tagName; |
|
| 226 | 226 | } |
| 227 | 227 | $address->appendChild( |
| 228 | 228 | $document->createElement( |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | if ($this->getNumber() !== null) { |
| 235 | 235 | $tagName = 'number'; |
| 236 | 236 | if ($prefix !== null) { |
| 237 | - $tagName = $prefix . ':' . $tagName; |
|
| 237 | + $tagName = $prefix.':'.$tagName; |
|
| 238 | 238 | } |
| 239 | 239 | $address->appendChild( |
| 240 | 240 | $document->createElement( |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | if ($this->getBox() !== null) { |
| 247 | 247 | $tagName = 'box'; |
| 248 | 248 | if ($prefix !== null) { |
| 249 | - $tagName = $prefix . ':' . $tagName; |
|
| 249 | + $tagName = $prefix.':'.$tagName; |
|
| 250 | 250 | } |
| 251 | 251 | $address->appendChild( |
| 252 | 252 | $document->createElement( |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | if ($this->getPostalCode() !== null) { |
| 259 | 259 | $tagName = 'postalCode'; |
| 260 | 260 | if ($prefix !== null) { |
| 261 | - $tagName = $prefix . ':' . $tagName; |
|
| 261 | + $tagName = $prefix.':'.$tagName; |
|
| 262 | 262 | } |
| 263 | 263 | $address->appendChild( |
| 264 | 264 | $document->createElement( |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | if ($this->getLocality() !== null) { |
| 271 | 271 | $tagName = 'locality'; |
| 272 | 272 | if ($prefix !== null) { |
| 273 | - $tagName = $prefix . ':' . $tagName; |
|
| 273 | + $tagName = $prefix.':'.$tagName; |
|
| 274 | 274 | } |
| 275 | 275 | $address->appendChild( |
| 276 | 276 | $document->createElement( |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | if ($this->getCountryCode() !== null) { |
| 283 | 283 | $tagName = 'countryCode'; |
| 284 | 284 | if ($prefix !== null) { |
| 285 | - $tagName = $prefix . ':' . $tagName; |
|
| 285 | + $tagName = $prefix.':'.$tagName; |
|
| 286 | 286 | } |
| 287 | 287 | $address->appendChild( |
| 288 | 288 | $document->createElement( |
@@ -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); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | { |
| 76 | 76 | $tagName = 'orderLine'; |
| 77 | 77 | if ($prefix !== null) { |
| 78 | - $tagName = $prefix . ':' . $tagName; |
|
| 78 | + $tagName = $prefix.':'.$tagName; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $line = $document->createElement($tagName); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | if ($this->getText() !== null) { |
| 84 | 84 | $tagName = 'text'; |
| 85 | 85 | if ($prefix !== null) { |
| 86 | - $tagName = $prefix . ':' . $tagName; |
|
| 86 | + $tagName = $prefix.':'.$tagName; |
|
| 87 | 87 | } |
| 88 | 88 | $line->appendChild( |
| 89 | 89 | $document->createElement( |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if ($this->getNumberOfItems() !== null) { |
| 96 | 96 | $tagName = 'nbOfItems'; |
| 97 | 97 | if ($prefix !== null) { |
| 98 | - $tagName = $prefix . ':' . $tagName; |
|
| 98 | + $tagName = $prefix.':'.$tagName; |
|
| 99 | 99 | } |
| 100 | 100 | $line->appendChild( |
| 101 | 101 | $document->createElement( |