Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function toNode(DOMDocument $document = null) |
||
34 | { |
||
35 | if (null === $document) { |
||
36 | $document = new DOMDocument(); |
||
37 | } |
||
38 | |||
39 | $node = $document->createElement('DeliveryTimeInformation'); |
||
40 | $node->appendChild($document->createElement('PackageBillType', $this->getPackageBillType())); |
||
41 | |||
42 | if ($this->getPickup() !== null) { |
||
43 | $node->appendChild($this->getPickup()->toNode($document)); |
||
44 | } |
||
45 | |||
46 | return $node; |
||
47 | } |
||
48 | |||
81 |