summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2017-11-02 19:28:44 +0000
committerAndres Rey <[email protected]>2017-11-02 19:29:33 +0000
commitc8c70ad3430983785aef5649b41861a4991af93b (patch)
treeda417f10ea85675e0771b9ef3fdeab733247a085 /src
parent7119097b8956b67732cdc638a02974fb30b9b8fd (diff)
Minor cleanup
Diffstat (limited to 'src')
-rw-r--r--src/Readability.php5
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;