diff options
author | Andres Rey <[email protected]> | 2017-11-28 19:30:25 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-28 19:30:25 +0000 |
commit | 1c0e5d7b77d293f952528619a346f7e8fbb64f05 (patch) | |
tree | 9e434e16e9b297af441a30782a0b51daab1b5f10 /src/Readability.php | |
parent | f043a9d71d08f285d0035c8505306a8a5bbbaa39 (diff) |
Move $dom variable to the top + fix indendation
Diffstat (limited to 'src/Readability.php')
-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: |