| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | 4 | protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void |
|
| 44 | { |
||
| 45 | 4 | $date = is_null($node->getLastModified()) ? new \DateTime():$node->getLastModified(); |
|
| 46 | |||
| 47 | 4 | $rootElement->appendChild($document->createElement( |
|
| 48 | 4 | $this->getNodeName(), |
|
| 49 | 4 | $date->format($this->getDefaultFormat()) |
|
| 50 | )); |
||
| 51 | 4 | } |
|
| 52 | } |
||
| 53 |