From 7874f6ac5831794fa38725fab8e2e5356b95541c Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Mon, 8 Feb 2021 19:42:10 +0300
Subject: [PATCH] remove PHPMD.UnusedFormalParameter

---
 classes/api.php                       |  3 ---
 classes/logger/stdout.php             |  3 ---
 classes/logger/syslog.php             |  5 +----
 classes/plugin.php                    |  3 ---
 classes/rssutils.php                  |  3 ---
 include/sessions.php                  |  6 ------
 plugins/af_proxy_http/init.php        |  3 ---
 plugins/af_readability/init.php       |  3 ---
 plugins/af_redditimgur/init.php       |  3 ---
 plugins/af_youtube_embed/init.php     |  3 ---
 plugins/auth_remote/init.php          |  3 ---
 plugins/cache_starred_images/init.php |  9 ---------
 plugins/close_button/init.php         |  5 +----
 plugins/no_iframes/init.php           |  3 ---
 plugins/vf_shared/init.php            | 11 +----------
 15 files changed, 3 insertions(+), 63 deletions(-)

diff --git a/classes/api.php b/classes/api.php
index 4b9c44073..520f0007d 100755
--- a/classes/api.php
+++ b/classes/api.php
@@ -642,9 +642,6 @@ class API extends Handler {
 		return $feeds;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	static function api_get_headlines($feed_id, $limit, $offset,
 				$filter, $is_cat, $show_excerpt, $show_content, $view_mode, $order,
 				$include_attachments, $since_id,
diff --git a/classes/logger/stdout.php b/classes/logger/stdout.php
index 856b2d027..4dac2e598 100644
--- a/classes/logger/stdout.php
+++ b/classes/logger/stdout.php
@@ -1,9 +1,6 @@
 <?php
 class Logger_Stdout {
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function log_error($errno, $errstr, $file, $line, $context) {
 
 		switch ($errno) {
diff --git a/classes/logger/syslog.php b/classes/logger/syslog.php
index ac9980f63..f1e151548 100644
--- a/classes/logger/syslog.php
+++ b/classes/logger/syslog.php
@@ -1,9 +1,6 @@
 <?php
 class Logger_Syslog {
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function log_error($errno, $errstr, $file, $line, $context) {
 
 		switch ($errno) {
@@ -30,4 +27,4 @@ class Logger_Syslog {
 
 	}
 
-}
\ No newline at end of file
+}
diff --git a/classes/plugin.php b/classes/plugin.php
index 5ac4a6a9a..2416418cd 100644
--- a/classes/plugin.php
+++ b/classes/plugin.php
@@ -22,9 +22,6 @@ abstract class Plugin {
 		return array();
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function is_public_method($method) {
 		return false;
 	}
diff --git a/classes/rssutils.php b/classes/rssutils.php
index 96128e60c..388eeb234 100755
--- a/classes/rssutils.php
+++ b/classes/rssutils.php
@@ -331,9 +331,6 @@ class RSSUtils {
 		}
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	static function update_rss_feed($feed, $no_cache = false) {
 
 		Debug::log("start", Debug::$LOG_VERBOSE);
diff --git a/include/sessions.php b/include/sessions.php
index 15725c1f9..d7dde782e 100644
--- a/include/sessions.php
+++ b/include/sessions.php
@@ -80,9 +80,6 @@
 		return true;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function ttrss_open ($s, $n) {
 		return true;
 	}
@@ -141,9 +138,6 @@
 		return true;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function ttrss_gc ($expire) {
 		Db::pdo()->query("DELETE FROM ttrss_sessions WHERE expire < " . time());
 
diff --git a/plugins/af_proxy_http/init.php b/plugins/af_proxy_http/init.php
index c7cded4c9..3bde08fdb 100644
--- a/plugins/af_proxy_http/init.php
+++ b/plugins/af_proxy_http/init.php
@@ -143,9 +143,6 @@ class Af_Proxy_Http extends Plugin {
 		return $url;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function hook_render_article_cdm($article, $api_mode = false) {
 
 		$need_saving = false;
diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php
index 8bd41cd77..a76c98380 100755
--- a/plugins/af_readability/init.php
+++ b/plugins/af_readability/init.php
@@ -189,9 +189,6 @@ class Af_Readability extends Plugin {
 		$this->host->set($this, "append_feeds", $append_feeds);
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function hook_article_filter_action($article, $action) {
 		switch ($action) {
 			case "action_inline":
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index dba1a2bff..2e89fcdff 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -718,9 +718,6 @@ class Af_RedditImgur extends Plugin {
 		return $this->get_header($url, CURLINFO_EFFECTIVE_URL, $useragent);
 	}
 
-	/**
-	 * @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") &&
diff --git a/plugins/af_youtube_embed/init.php b/plugins/af_youtube_embed/init.php
index 0a6160752..db82dc9f5 100644
--- a/plugins/af_youtube_embed/init.php
+++ b/plugins/af_youtube_embed/init.php
@@ -19,9 +19,6 @@ class Af_Youtube_Embed extends Plugin {
 		return in_array($src, ["www.youtube.com", "youtube.com", "youtu.be"]);
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function hook_render_enclosure($entry, $hide_images) {
 
 		$matches = array();
diff --git a/plugins/auth_remote/init.php b/plugins/auth_remote/init.php
index 71f6cae2b..18ec0e1a6 100644
--- a/plugins/auth_remote/init.php
+++ b/plugins/auth_remote/init.php
@@ -34,9 +34,6 @@ class Auth_Remote extends Auth_Base {
 		return "";
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function authenticate($login, $password) {
 		$try_login = "";
 
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index 0911825e7..9dd4cd49d 100755
--- a/plugins/cache_starred_images/init.php
+++ b/plugins/cache_starred_images/init.php
@@ -32,9 +32,6 @@ class Cache_Starred_Images extends Plugin {
 		}
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedLocalVariable)
-	 */
 	function hook_house_keeping() {
 		/* since HOOK_UPDATE_TASK is not available to user plugins, this hook is a next best thing */
 
@@ -107,9 +104,6 @@ class Cache_Starred_Images extends Plugin {
 		return $enc;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes, $article_id) {
 		$xpath = new DOMXpath($doc);
 
@@ -153,9 +147,6 @@ class Cache_Starred_Images extends Plugin {
 		return false;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	private function cache_article_images($content, $site_url, $owner_uid, $article_id) {
 		$status_filename = $article_id . "-" . sha1($site_url) . ".status";
 
diff --git a/plugins/close_button/init.php b/plugins/close_button/init.php
index 62404a6ee..6de43782f 100644
--- a/plugins/close_button/init.php
+++ b/plugins/close_button/init.php
@@ -18,9 +18,6 @@ class Close_Button extends Plugin {
 		return "i.icon-close-article { color : red; }";
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function hook_article_button($line) {
 		if (!get_pref("COMBINED_DISPLAY_MODE")) {
 			$rv = "<i class='material-icons icon-close-article'
@@ -35,4 +32,4 @@ class Close_Button extends Plugin {
 		return 2;
 	}
 
-}
\ No newline at end of file
+}
diff --git a/plugins/no_iframes/init.php b/plugins/no_iframes/init.php
index 9711eeb24..dd3502cbd 100644
--- a/plugins/no_iframes/init.php
+++ b/plugins/no_iframes/init.php
@@ -14,9 +14,6 @@ class No_Iframes extends Plugin {
 		$host->add_hook($host::HOOK_SANITIZE, $this);
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes) {
 
 		$xpath = new DOMXpath($doc);
diff --git a/plugins/vf_shared/init.php b/plugins/vf_shared/init.php
index 8414a6f08..8c38cbf32 100644
--- a/plugins/vf_shared/init.php
+++ b/plugins/vf_shared/init.php
@@ -21,9 +21,6 @@ class VF_Shared extends Plugin {
 		return 2;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function get_unread($feed_id) {
 		$sth = $this->pdo->prepare("select count(int_id) AS count
 			from ttrss_user_entries where owner_uid = ? and unread = true and uuid != ''");
@@ -36,9 +33,6 @@ class VF_Shared extends Plugin {
 		return 0;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function get_total($feed_id) {
 		$sth = $this->pdo->prepare("select count(int_id) AS count
 			from ttrss_user_entries where owner_uid = ? and uuid != ''");
@@ -51,9 +45,6 @@ class VF_Shared extends Plugin {
 		return 0;
 	}
 
-	/**
-	 * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-	 */
 	function get_headlines($feed_id, $options) {
 		$params = array(
 			"feed" => -4,
@@ -75,4 +66,4 @@ class VF_Shared extends Plugin {
 		return $qfh_ret;
 	}
 
-}
\ No newline at end of file
+}
-- 
GitLab