From 21ce7d9ec02b0bf7c6e0ac7c28bc7c1bb0a841c5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 26 Apr 2017 20:57:36 +0300 Subject: update phpmd ruleset to use (subset) of cleancode fix various minor issues reported by static analysis remove redundant php closing tag from several more files --- plugins/af_readability/init.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/af_readability/init.php') diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 9557a9791..fae50a7ea 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -128,6 +128,9 @@ class Af_Readability extends Plugin { $this->host->set($this, "enabled_feeds", $enabled_feeds); } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ function hook_article_filter_action($article, $action) { return $this->process_article($article); } @@ -146,7 +149,7 @@ class Af_Readability extends Plugin { curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT); - @$result = curl_exec($ch); + @curl_exec($ch); $content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE); if (strpos($content_type, "text/html") === FALSE) @@ -243,4 +246,3 @@ class Af_Readability extends Plugin { } } -?> -- cgit v1.2.3-54-g00ecf