diff options
Diffstat (limited to 'src/Nodes')
-rw-r--r-- | src/Nodes/DOM/DOMNodeList.php | 13 | ||||
-rw-r--r-- | src/Nodes/NodeTrait.php | 4 | ||||
-rw-r--r-- | src/Nodes/NodeUtility.php | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/src/Nodes/DOM/DOMNodeList.php b/src/Nodes/DOM/DOMNodeList.php index 6a53fdf..5149c0b 100644 --- a/src/Nodes/DOM/DOMNodeList.php +++ b/src/Nodes/DOM/DOMNodeList.php @@ -3,7 +3,7 @@ namespace andreskrey\Readability\Nodes\DOM; /** - * Class DOMNodeList + * Class DOMNodeList. * * This is a fake DOMNodeList class that allows adding items to the list. The original class is static and the nodes * are defined automagically when instantiating it. This fake version behaves exactly the same way but adds the function @@ -11,8 +11,6 @@ namespace andreskrey\Readability\Nodes\DOM; * * It cannot extend the original DOMNodeList class because the functionality behind the property ->length is hidden * from the user and cannot be extended, changed, or tweaked. - * - * @package andreskrey\Readability\Nodes\DOM */ class DOMNodeList implements \Countable, \IteratorAggregate { @@ -27,9 +25,9 @@ class DOMNodeList implements \Countable, \IteratorAggregate protected $length = 0; /** - * To allow access to length in the same way that DOMNodeList allows + * To allow access to length in the same way that DOMNodeList allows. * - * {@inheritDoc} + * {@inheritdoc} */ public function __get($name) { @@ -73,13 +71,12 @@ class DOMNodeList implements \Countable, \IteratorAggregate } /** - * To make it compatible with iterator_to_array() function + * To make it compatible with iterator_to_array() function. * - * {@inheritDoc} + * {@inheritdoc} */ public function getIterator(): \ArrayIterator { return new \ArrayIterator($this->items); } - } diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php index 26f9c16..5198bbb 100644 --- a/src/Nodes/NodeTrait.php +++ b/src/Nodes/NodeTrait.php @@ -81,7 +81,7 @@ trait NodeTrait */ public function isReadabilityDataTable() { - /** + /* * This is a workaround that I'd like to remove in the future. * Seems that although we are extending the base DOMElement and adding custom properties (like this one, * 'readabilityDataTable'), these properties get lost when you search for elements with getElementsByTagName. @@ -184,8 +184,8 @@ trait NodeTrait * @param $attributeName * * @return bool - * @see getAttribute * + * @see getAttribute */ public function hasAttribute($attributeName) { diff --git a/src/Nodes/NodeUtility.php b/src/Nodes/NodeUtility.php index de6a416..cbf78ba 100644 --- a/src/Nodes/NodeUtility.php +++ b/src/Nodes/NodeUtility.php @@ -160,9 +160,10 @@ class NodeUtility } /** - * Remove all empty DOMNodes from DOMNodeLists + * Remove all empty DOMNodes from DOMNodeLists. * * @param \DOMNodeList $list + * * @return DOMNodeList */ public static function filterTextNodes(\DOMNodeList $list) @@ -173,6 +174,7 @@ class NodeUtility $newList->add($node); } } + return $newList; } } |