diff options
author | Andres Rey <[email protected]> | 2017-11-02 19:28:44 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2017-11-02 19:29:33 +0000 |
commit | c8c70ad3430983785aef5649b41861a4991af93b (patch) | |
tree | da417f10ea85675e0771b9ef3fdeab733247a085 | |
parent | 7119097b8956b67732cdc638a02974fb30b9b8fd (diff) |
Minor cleanup
-rw-r--r-- | src/Readability.php | 5 |
1 files changed, 1 insertions, 4 deletions
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; |