protected function setNonEmptyAttribute(\DomElement $element, string $name, string $value = null) : void
    {
        if (! is_null($value)) {
            $element->setAttribute($name, $value);
        }
    }
protected function setNonEmptyAttribute(\DomElement $element, string $name, string $value = null) : void
    {
        if (! is_null($value)) {
            $element->setAttribute($name, $value);
        }
    }
protected function setNonEmptyAttribute ( \ DomElement $ element , string $ name , string $ value = null ) : void { if ( ! is_null ( $ value ) ) { $ element -> setAttribute ( $ name , $ value ) ; } }
Sets the attribute only if the value is not empty
@param DomElement $element
@param string     $name
@param string     $value
Sets the attribute only if the value is not empty