diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Readability.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Readability.php b/src/Readability.php index 48da9a5..6738c4a 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -22,6 +22,11 @@ use andreskrey\Readability\NodeClass\NodeClassTrait; class Readability { /** + * @var DOMDocument + */ + protected $dom; + + /** * @var string|null */ protected $title = null; @@ -84,9 +89,6 @@ class Readability '#text', ]; - - private $dom; - /** * Readability constructor. * @@ -423,7 +425,7 @@ class Readability $matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id'); // Remove DOMComments nodes as we don't need them and mess up children counting - if ($node->nodeType ===XML_COMMENT_NODE) { + if ($node->nodeType === XML_COMMENT_NODE) { $node = NodeUtility::removeAndGetNext($node); continue; } @@ -679,7 +681,7 @@ class Readability /** @var DOMElement $level */ foreach ($ancestors as $level => $ancestor) { - $candidates[] = $ancestor; + $candidates[] = $ancestor; /* * Node score divider: |