summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2017-11-30 20:09:59 +0000
committerAndres Rey <[email protected]>2017-11-30 20:09:59 +0000
commit269cae7d0faad6748ffa1454cf03e45fa63e524c (patch)
tree968c8db7f9b8de3166225328c9dec0041b599cd9 /src/Readability.php
parentfc4834c588c61ab42b89e3324fa01d467f4a8d00 (diff)
Import functions from NodeUtility to NodeClassTrait
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Readability.php b/src/Readability.php
index 1cd7c1f..a259f5f 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -543,12 +543,12 @@ class Readability
* safely converted into plain P elements to avoid confusing the scoring
* algorithm with DIVs with are, in practice, paragraphs.
*/
- if (NodeUtility::hasSinglePNode($node)) {
+ if ($node->hasSinglePNode()) {
$pNode = $node->getChildren(true)[0];
$node->parentNode->replaceChild($pNode, $node);
$node = $pNode;
$elementsToScore[] = $node;
- } elseif (!NodeUtility::hasSingleChildBlockElement($node)) {
+ } elseif (!$node->hasSingleChildBlockElement()) {
$node = NodeUtility::setNodeTag($node, 'p');
$elementsToScore[] = $node;
} else {