diff options
author | Andres Rey <[email protected]> | 2017-12-01 17:17:19 +0000 |
---|---|---|
committer | StyleCI Bot <[email protected]> | 2017-12-01 17:17:19 +0000 |
commit | 995d6fb8045bbbebfe8578f86431aa522985ee6e (patch) | |
tree | 1f78f7ad34992c4502f0e9153aced92ac4b1ae76 /src/NodeUtility.php | |
parent | 35f81ed82beffcacbaa3e2937e90a8cf30b4f9ec (diff) |
Apply fixes from StyleCI
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. |