1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 13:45:56 +00:00

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
This commit is contained in:
Andrew Dolgov
2017-04-26 20:57:36 +03:00
parent ea79a0e033
commit 21ce7d9ec0
53 changed files with 138 additions and 173 deletions

View File

@@ -73,6 +73,9 @@ class Af_RedditImgur extends Plugin {
echo __("Configuration saved");
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
private function inline_stuff($article, &$doc, $xpath, $debug = false) {
$entries = $xpath->query('(//a[@href]|//img[@src])');
@@ -442,13 +445,16 @@ class Af_RedditImgur extends Plugin {
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("open_basedir"));
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
@$result = curl_exec($ch);
@curl_exec($ch);
$content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
}
return $content_type;
}
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
private function readability($article, $url, $doc, $xpath, $debug = false) {
if (!defined('NO_CURL') && function_exists("curl_init") && $this->host->get($this, "enable_readability") &&
@@ -510,4 +516,3 @@ class Af_RedditImgur extends Plugin {
return $article;
}
}
?>