protected function appendArgument(
        \DOMDocument $document,
        \DOMElement $element,
        $value,
        $name = ''
    ) {
        $argument = $document->createElement('arg');
        if (!empty($name)) {
            $argument->setAttribute('name', $name);
        }

        if (!empty($value)) {
            $argument->setAttribute('value', $value);
        }

        $element->appendChild($argument);

    }