Skip to content

Commit

Permalink
fix (AtBpost): Remove XML namespace prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Pommier committed Aug 22, 2016
1 parent f141017 commit a534429
Showing 1 changed file with 6 additions and 24 deletions.
30 changes: 6 additions & 24 deletions src/Bpost/Order/Box/AtBpost.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,12 @@ public function toXML(\DOMDocument $document, $prefix = null, $type = null)

if ($this->getPugoId() !== null) {
$boxElement->appendChild(
$document->createElement(
$this->getPrefixedTagName('pugoId', $prefix),
$this->getPugoId()
)
$document->createElement('pugoId', $this->getPugoId())
);
}
if ($this->getPugoName() !== null) {
$boxElement->appendChild(
$document->createElement(
$this->getPrefixedTagName('pugoName', $prefix),
$this->getPugoName()
)
$document->createElement('pugoName', $this->getPugoName())
);
}
if ($this->getPugoAddress() !== null) {
Expand All @@ -217,18 +211,12 @@ public function toXML(\DOMDocument $document, $prefix = null, $type = null)
}
if ($this->getReceiverName() !== null) {
$boxElement->appendChild(
$document->createElement(
$this->getPrefixedTagName('receiverName', $prefix),
$this->getReceiverName()
)
$document->createElement('receiverName', $this->getReceiverName())
);
}
if ($this->getReceiverCompany() !== null) {
$boxElement->appendChild(
$document->createElement(
$this->getPrefixedTagName('receiverCompany', $prefix),
$this->getReceiverCompany()
)
$document->createElement('receiverCompany', $this->getReceiverCompany())
);
}
$this->addToXmlRequestedDeliveryDate($document, $boxElement, $prefix);
Expand All @@ -246,10 +234,7 @@ protected function addToXmlRequestedDeliveryDate(\DOMDocument $document, \DOMEle
{
if ($this->getRequestedDeliveryDate() !== null) {
$typeElement->appendChild(
$document->createElement(
$this->getPrefixedTagName('requestedDeliveryDate', $prefix),
$this->getRequestedDeliveryDate()
)
$document->createElement('requestedDeliveryDate', $this->getRequestedDeliveryDate())
);
}
}
Expand All @@ -258,10 +243,7 @@ private function addToXmlShopHandlingInstruction(\DOMDocument $document, \DOMEle
{
if ($this->getShopHandlingInstruction() !== null) {
$typeElement->appendChild(
$document->createElement(
$this->getPrefixedTagName('shopHandlingInstruction', $prefix),
$this->getShopHandlingInstruction()
)
$document->createElement('shopHandlingInstruction', $this->getShopHandlingInstruction())
);
}
}
Expand Down

0 comments on commit a534429

Please sign in to comment.