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