diff options
author | Andres Rey <[email protected]> | 2017-11-29 23:36:48 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-29 23:36:48 +0000 |
commit | 2b18cd48bc884e023be84527f3c2ce2e232bf91b (patch) | |
tree | 4ecb080a5e79c2c3747714169f28b6cd496f3e06 | |
parent | 90c7291789e29be7a394e1fd1b4d00148525cdc7 (diff) |
Even better refactor on getAllLinks
-rw-r--r-- | src/NodeClass/NodeClassTrait.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/NodeClass/NodeClassTrait.php b/src/NodeClass/NodeClassTrait.php index 2fc714b..8595958 100644 --- a/src/NodeClass/NodeClassTrait.php +++ b/src/NodeClass/NodeClassTrait.php @@ -142,11 +142,7 @@ trait NodeClassTrait */ public function getAllLinks() { - if ($this->nodeType === XML_TEXT_NODE) { - return null; - } else { - return iterator_to_array($this->getElementsByTagName('a')); - } + return iterator_to_array($this->getElementsByTagName('a')); } /** |