diff options
Diffstat (limited to 'src/NodeUtility.php')
-rw-r--r-- | src/NodeUtility.php | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/NodeUtility.php b/src/NodeUtility.php index d0796dd..7fbdd45 100644 --- a/src/NodeUtility.php +++ b/src/NodeUtility.php @@ -7,14 +7,12 @@ use andreskrey\Readability\NodeClass\DOMElement; use andreskrey\Readability\NodeClass\DOMNode; /** - * Class NodeUtility - * @package andreskrey\Readability + * Class NodeUtility. */ class NodeUtility { - /** - * Collection of regexps to check the node usability + * Collection of regexps to check the node usability. * * @var array */ @@ -36,12 +34,11 @@ class NodeUtility 'onlyWhitespace' => '/\x{00A0}|\s+/u' ]; - /** - * - * Imported from the Element class on league\html-to-markdown + * Imported from the Element class on league\html-to-markdown. * * @param $node + * * @return DOMElement */ public static function nextElement($node) @@ -56,13 +53,13 @@ class NodeUtility return $next; } - /** * Changes the node tag name. Since tagName on DOMElement is a read only value, this must be done creating a new * element with the new tag name and importing it to the main DOMDocument. * * @param string $value * @param bool $importAttributes + * * @return DOMNode */ public static function setNodeTag($node, $value, $importAttributes = false) @@ -72,7 +69,6 @@ class NodeUtility $children = $node->childNodes; /** @var $children \DOMNodeList $i */ - for ($i = 0; $i < $children->length; $i++) { $import = $new->importNode($children->item($i), true); $new->firstChild->appendChild($import); @@ -122,7 +118,6 @@ class NodeUtility } } - /** * Returns the next node. First checks for children (if the flag allows it), then for siblings, and finally * for parents. |