Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

Commit

Permalink
Update Element.php
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Apr 21, 2021
1 parent 66c5e13 commit 998e5f1
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,15 @@
class Element extends \DOMElement implements XPathAware
{
/**
* Create and append a text-node with the given name and optionally given value.
* Create and append a text-node with the given value.
*
* @param string $name
* @param string $value
*
* @return Element
*/
public function appendTextNode($name, $value = null)
public function appendTextNode($value)
{
$el = new self($name);
$el->appendChild($this->owner()->createTextNode($value));

$element = $this->appendChild($el);
$element = $this->appendChild($this->owner()->createTextNode($value));
assert($element instanceof Element);

return $element;
Expand Down

0 comments on commit 998e5f1

Please sign in to comment.