diff options
author | Andres Rey <[email protected]> | 2017-11-30 20:03:08 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-30 20:03:08 +0000 |
commit | 89555a061f7166a85c2a8ea0a7176067990c64a3 (patch) | |
tree | 634c268909fb708ef7678595e889f02576379352 /src/Readability.php | |
parent | 2345497c61e486aa1220bf4e092de9aee1d1e285 (diff) |
Remove duplicated function and fix calls
Diffstat (limited to 'src/Readability.php')
-rw-r--r-- | src/Readability.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Readability.php b/src/Readability.php index 0684b7b..b80641e 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -563,7 +563,7 @@ class Readability } } - $node = $node->getNextNode($node); + $node = NodeUtility::getNextNode($node); } return $elementsToScore; @@ -1172,13 +1172,13 @@ class Readability **/ public function _cleanMatchedNodes($node, $regex) { - $endOfSearchMarkerNode = $node->getNextNode($node, true); - $next = $node->getNextNode($node); + $endOfSearchMarkerNode = NodeUtility::getNextNode($node, true); + $next = NodeUtility::getNextNode($node); while ($next && $next !== $endOfSearchMarkerNode) { if (preg_match($regex, sprintf('%s %s', $next->getAttribute('class'), $next->getAttribute('id')))) { $next = NodeUtility::removeAndGetNext($next); } else { - $next = $next->getNextNode($next); + $next = NodeUtility::getNextNode($next); } } } |