remove PHPMD.UnusedFormalParameter

This commit is contained in:
Andrew Dolgov 2021-02-08 19:42:10 +03:00
parent a341a838b1
commit 7874f6ac58
15 changed files with 3 additions and 63 deletions

View File

@ -642,9 +642,6 @@ class API extends Handler {
return $feeds; return $feeds;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
static function api_get_headlines($feed_id, $limit, $offset, static function api_get_headlines($feed_id, $limit, $offset,
$filter, $is_cat, $show_excerpt, $show_content, $view_mode, $order, $filter, $is_cat, $show_excerpt, $show_content, $view_mode, $order,
$include_attachments, $since_id, $include_attachments, $since_id,

View File

@ -1,9 +1,6 @@
<?php <?php
class Logger_Stdout { class Logger_Stdout {
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function log_error($errno, $errstr, $file, $line, $context) { function log_error($errno, $errstr, $file, $line, $context) {
switch ($errno) { switch ($errno) {

View File

@ -1,9 +1,6 @@
<?php <?php
class Logger_Syslog { class Logger_Syslog {
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function log_error($errno, $errstr, $file, $line, $context) { function log_error($errno, $errstr, $file, $line, $context) {
switch ($errno) { switch ($errno) {
@ -30,4 +27,4 @@ class Logger_Syslog {
} }
} }

View File

@ -22,9 +22,6 @@ abstract class Plugin {
return array(); return array();
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function is_public_method($method) { function is_public_method($method) {
return false; return false;
} }

View File

@ -331,9 +331,6 @@ class RSSUtils {
} }
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
static function update_rss_feed($feed, $no_cache = false) { static function update_rss_feed($feed, $no_cache = false) {
Debug::log("start", Debug::$LOG_VERBOSE); Debug::log("start", Debug::$LOG_VERBOSE);

View File

@ -80,9 +80,6 @@
return true; return true;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function ttrss_open ($s, $n) { function ttrss_open ($s, $n) {
return true; return true;
} }
@ -141,9 +138,6 @@
return true; return true;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function ttrss_gc ($expire) { function ttrss_gc ($expire) {
Db::pdo()->query("DELETE FROM ttrss_sessions WHERE expire < " . time()); Db::pdo()->query("DELETE FROM ttrss_sessions WHERE expire < " . time());

View File

@ -143,9 +143,6 @@ class Af_Proxy_Http extends Plugin {
return $url; return $url;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function hook_render_article_cdm($article, $api_mode = false) { function hook_render_article_cdm($article, $api_mode = false) {
$need_saving = false; $need_saving = false;

View File

@ -189,9 +189,6 @@ class Af_Readability extends Plugin {
$this->host->set($this, "append_feeds", $append_feeds); $this->host->set($this, "append_feeds", $append_feeds);
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function hook_article_filter_action($article, $action) { function hook_article_filter_action($article, $action) {
switch ($action) { switch ($action) {
case "action_inline": case "action_inline":

View File

@ -718,9 +718,6 @@ class Af_RedditImgur extends Plugin {
return $this->get_header($url, CURLINFO_EFFECTIVE_URL, $useragent); return $this->get_header($url, CURLINFO_EFFECTIVE_URL, $useragent);
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
private function readability($article, $url, $doc, $xpath, $debug = false) { private function readability($article, $url, $doc, $xpath, $debug = false) {
if (!defined('NO_CURL') && function_exists("curl_init") && $this->host->get($this, "enable_readability") && if (!defined('NO_CURL') && function_exists("curl_init") && $this->host->get($this, "enable_readability") &&

View File

@ -19,9 +19,6 @@ class Af_Youtube_Embed extends Plugin {
return in_array($src, ["www.youtube.com", "youtube.com", "youtu.be"]); return in_array($src, ["www.youtube.com", "youtube.com", "youtu.be"]);
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function hook_render_enclosure($entry, $hide_images) { function hook_render_enclosure($entry, $hide_images) {
$matches = array(); $matches = array();

View File

@ -34,9 +34,6 @@ class Auth_Remote extends Auth_Base {
return ""; return "";
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function authenticate($login, $password) { function authenticate($login, $password) {
$try_login = ""; $try_login = "";

View File

@ -32,9 +32,6 @@ class Cache_Starred_Images extends Plugin {
} }
} }
/**
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
function hook_house_keeping() { function hook_house_keeping() {
/* since HOOK_UPDATE_TASK is not available to user plugins, this hook is a next best thing */ /* 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; return $enc;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes, $article_id) { function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes, $article_id) {
$xpath = new DOMXpath($doc); $xpath = new DOMXpath($doc);
@ -153,9 +147,6 @@ class Cache_Starred_Images extends Plugin {
return false; return false;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
private function cache_article_images($content, $site_url, $owner_uid, $article_id) { private function cache_article_images($content, $site_url, $owner_uid, $article_id) {
$status_filename = $article_id . "-" . sha1($site_url) . ".status"; $status_filename = $article_id . "-" . sha1($site_url) . ".status";

View File

@ -18,9 +18,6 @@ class Close_Button extends Plugin {
return "i.icon-close-article { color : red; }"; return "i.icon-close-article { color : red; }";
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function hook_article_button($line) { function hook_article_button($line) {
if (!get_pref("COMBINED_DISPLAY_MODE")) { if (!get_pref("COMBINED_DISPLAY_MODE")) {
$rv = "<i class='material-icons icon-close-article' $rv = "<i class='material-icons icon-close-article'
@ -35,4 +32,4 @@ class Close_Button extends Plugin {
return 2; return 2;
} }
} }

View File

@ -14,9 +14,6 @@ class No_Iframes extends Plugin {
$host->add_hook($host::HOOK_SANITIZE, $this); $host->add_hook($host::HOOK_SANITIZE, $this);
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes) { function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes) {
$xpath = new DOMXpath($doc); $xpath = new DOMXpath($doc);

View File

@ -21,9 +21,6 @@ class VF_Shared extends Plugin {
return 2; return 2;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function get_unread($feed_id) { function get_unread($feed_id) {
$sth = $this->pdo->prepare("select count(int_id) AS count $sth = $this->pdo->prepare("select count(int_id) AS count
from ttrss_user_entries where owner_uid = ? and unread = true and uuid != ''"); from ttrss_user_entries where owner_uid = ? and unread = true and uuid != ''");
@ -36,9 +33,6 @@ class VF_Shared extends Plugin {
return 0; return 0;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function get_total($feed_id) { function get_total($feed_id) {
$sth = $this->pdo->prepare("select count(int_id) AS count $sth = $this->pdo->prepare("select count(int_id) AS count
from ttrss_user_entries where owner_uid = ? and uuid != ''"); from ttrss_user_entries where owner_uid = ? and uuid != ''");
@ -51,9 +45,6 @@ class VF_Shared extends Plugin {
return 0; return 0;
} }
/**
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
function get_headlines($feed_id, $options) { function get_headlines($feed_id, $options) {
$params = array( $params = array(
"feed" => -4, "feed" => -4,
@ -75,4 +66,4 @@ class VF_Shared extends Plugin {
return $qfh_ret; return $qfh_ret;
} }
} }