protected function appendNonEmptyChild(\DomDocument $document, \DOMElement $element, string $name, string $value = null) : void
    {
        if (! is_null($value)) {
            $element->appendChild($document->createElement($name, $value));
        }
    }
protected function appendNonEmptyChild(\DomDocument $document, \DOMElement $element, string $name, string $value = null) : void
    {
        if (! is_null($value)) {
            $element->appendChild($document->createElement($name, $value));
        }
    }
protected function appendNonEmptyChild ( \ DomDocument $ document , \ DOMElement $ element , string $ name , string $ value = null ) : void { if ( ! is_null ( $ value ) ) { $ element -> appendChild ( $ document -> createElement ( $ name , $ value ) ) ; } }
Appends a child node only if the value is not null
@param DomDocument $document
@param DOMElement  $element
@param string      $name
@param string      $value
Appends a child node only if the value is not null