Skip to content

Commit 4d2a1da

Browse files
authored
Update DOMDoc comment
1 parent 5764121 commit 4d2a1da

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

Diff for: src/DOMDoc.php

+17-23
Original file line numberDiff line numberDiff line change
@@ -345,20 +345,17 @@ public function createElementFromXML($xml) {
345345
return $this->importNode($element, true);
346346
}
347347

348-
/**
349-
* Append a child to the context node, make it the last child
350-
*
351-
* @param mixed $newnode
352-
* $newnode can either be an XML string, a DOMDocument, or a DOMElement.
353-
*
354-
* @param mixed $context
355-
* $context can either be an xpath string, or a DOMElement
356-
* Omiting $context results in using the root document element as the context
357-
*
358-
* @return DOMElement|false
359-
* The $newnode, properly attached to DOMDocument. If you passed $newnode as a DOMElement
360-
* then you should replace your DOMElement with the returned one.
361-
*/
348+
/**
349+
* Append a child to the context node, make it the first child
350+
*
351+
* @param ...$nodes
352+
* ...$nodes can either be an XML string, a DOMDocument, or a DOMElement.
353+
* newnode, context
354+
*
355+
* @return void
356+
* As per new DOMDocumentt prototype
357+
* Nothing to return.
358+
*/
362359
public function append(...$nodes) : void {
363360
// $nodes[0] is newnode.
364361
// $nodes[1] is context.
@@ -374,16 +371,13 @@ public function append(...$nodes) : void {
374371
/**
375372
* Append a child to the context node, make it the first child
376373
*
377-
* @param mixed $newnode
378-
* $newnode can either be an XML string, a DOMDocument, or a DOMElement.
379-
*
380-
* @param mixed $context
381-
* $context can either be an xpath string, or a DOMElement
382-
* Omiting $context results in using the root document element as the context
374+
* @param ...$nodes
375+
* ...$nodes can either be an XML string, a DOMDocument, or a DOMElement.
376+
* newnode, context
383377
*
384-
* @return DOMElement|false
385-
* The $newnode, properly attached to DOMDocument. If you passed $newnode as a DOMElement
386-
* then you should replace your DOMElement with the returned one.
378+
* @return void
379+
* As per new DOMDocument prototype
380+
* Nothing to return.
387381
*/
388382
public function prepend(...$nodes): void {
389383
// $nodes[0] is newnode.

0 commit comments

Comments
 (0)