From c8c70ad3430983785aef5649b41861a4991af93b Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Thu, 2 Nov 2017 19:28:44 +0000 Subject: Minor cleanup --- src/Readability.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/Readability.php b/src/Readability.php index c55e0ad..4ee85e1 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -50,10 +50,7 @@ class Readability extends Element implements ReadabilityInterface * An if must be added before calling the getAttribute function, because if we reach the DOMDocument * by getting the node parents we'll get a undefined function fatal error */ - $score = 0; - - // Check if the getAttribute method exists, as some elements lack of it (and calling it anyway throws an exception) - if (method_exists($node, 'getAttribute')) { + if (method_exists($node, 'getAttribute')) { if ($node->hasAttribute('data-readability')) { // Node was initialized previously. Restoring score and setting flag. $this->initialized = true; -- cgit v1.2.3