summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-11-10 20:58:40 +0300
committerAndrew Dolgov <[email protected]>2021-11-10 20:58:40 +0300
commit87a30d88d36941ad817f0d1409e2ededbe576af6 (patch)
tree0bd599c73c4bb16fab6d58b24332ac5497503e35 /plugins
parent9e8d69739f21e5ac85977d57a2a6c961e318c26e (diff)
plugin cleanup re: phpstan 1.0 warnings
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/af_comics/init.php3
-rwxr-xr-xplugins/af_redditimgur/init.php1
-rw-r--r--plugins/af_youtube_embed/init.php3
-rw-r--r--plugins/af_zz_vidmute/init.php5
-rw-r--r--plugins/auth_internal/init.php5
-rw-r--r--plugins/auth_remote/init.php5
-rwxr-xr-xplugins/auto_assign_labels/init.php5
-rw-r--r--plugins/hotkeys_force_top/init.php3
-rw-r--r--plugins/hotkeys_noscroll/init.php4
-rw-r--r--plugins/hotkeys_swap_jk/init.php4
-rw-r--r--plugins/no_iframes/init.php3
-rw-r--r--plugins/note/init.php5
-rw-r--r--plugins/shorten_expanded/init.php3
-rw-r--r--plugins/toggle_sidebar/init.php4
14 files changed, 4 insertions, 49 deletions
diff --git a/plugins/af_comics/init.php b/plugins/af_comics/init.php
index 19b1be859..84d95a2ba 100755
--- a/plugins/af_comics/init.php
+++ b/plugins/af_comics/init.php
@@ -1,7 +1,6 @@
<?php
class Af_Comics extends Plugin {
- private $host;
private $filters = array();
function about() {
@@ -11,8 +10,6 @@ class Af_Comics extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_FETCH_FEED, $this);
$host->add_hook($host::HOOK_FEED_BASIC_INFO, $this);
$host->add_hook($host::HOOK_SUBSCRIBE_FEED, $this);
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index dd8fbf651..bd4032050 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -827,6 +827,7 @@ class Af_RedditImgur extends Plugin {
return $this->get_header($url, CURLINFO_CONTENT_TYPE, $useragent);
}
+ // @phpstan-ignore-next-line
private function get_location($url, $useragent = false) {
return $this->get_header($url, CURLINFO_EFFECTIVE_URL, $useragent);
}
diff --git a/plugins/af_youtube_embed/init.php b/plugins/af_youtube_embed/init.php
index 72d25a826..771ee8c46 100644
--- a/plugins/af_youtube_embed/init.php
+++ b/plugins/af_youtube_embed/init.php
@@ -1,6 +1,5 @@
<?php
class Af_Youtube_Embed extends Plugin {
- private $host;
function about() {
return array(null,
@@ -9,8 +8,6 @@ class Af_Youtube_Embed extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_RENDER_ENCLOSURE, $this);
$host->add_hook($host::HOOK_IFRAME_WHITELISTED, $this);
}
diff --git a/plugins/af_zz_vidmute/init.php b/plugins/af_zz_vidmute/init.php
index 30eced5e7..268a2c4ac 100644
--- a/plugins/af_zz_vidmute/init.php
+++ b/plugins/af_zz_vidmute/init.php
@@ -1,6 +1,5 @@
<?php
class Af_Zz_VidMute extends Plugin {
- private $host;
function about() {
return array(null,
@@ -9,7 +8,7 @@ class Af_Zz_VidMute extends Plugin {
}
function init($host) {
- $this->host = $host;
+
}
function get_js() {
@@ -20,4 +19,4 @@ class Af_Zz_VidMute extends Plugin {
return 2;
}
-} \ No newline at end of file
+}
diff --git a/plugins/auth_internal/init.php b/plugins/auth_internal/init.php
index 3f5a2e977..77f7596f0 100644
--- a/plugins/auth_internal/init.php
+++ b/plugins/auth_internal/init.php
@@ -1,8 +1,6 @@
<?php
class Auth_Internal extends Auth_Base {
- private $host;
-
function about() {
return array(null,
"Authenticates against internal tt-rss database",
@@ -10,10 +8,7 @@ class Auth_Internal extends Auth_Base {
true);
}
- /* @var PluginHost $host */
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_AUTH_USER, $this);
}
diff --git a/plugins/auth_remote/init.php b/plugins/auth_remote/init.php
index 3be7aa26e..b240a9402 100644
--- a/plugins/auth_remote/init.php
+++ b/plugins/auth_remote/init.php
@@ -1,8 +1,6 @@
<?php
class Auth_Remote extends Auth_Base {
- private $host;
-
function about() {
return array(null,
"Authenticates against remote password (e.g. supplied by Apache)",
@@ -10,10 +8,7 @@ class Auth_Remote extends Auth_Base {
true);
}
- /* @var PluginHost $host */
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_AUTH_USER, $this);
}
diff --git a/plugins/auto_assign_labels/init.php b/plugins/auto_assign_labels/init.php
index 786720d95..84fce8d64 100755
--- a/plugins/auto_assign_labels/init.php
+++ b/plugins/auto_assign_labels/init.php
@@ -1,9 +1,6 @@
<?php
class Auto_Assign_Labels extends Plugin {
- /* @var PluginHost $host */
- private $host;
-
function about() {
return array(null,
"Assign labels automatically based on article title, content, and tags",
@@ -11,8 +8,6 @@ class Auto_Assign_Labels extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_ARTICLE_FILTER, $this);
}
diff --git a/plugins/hotkeys_force_top/init.php b/plugins/hotkeys_force_top/init.php
index 9c17307bd..3b0844fa7 100644
--- a/plugins/hotkeys_force_top/init.php
+++ b/plugins/hotkeys_force_top/init.php
@@ -1,7 +1,5 @@
<?php
class Hotkeys_Force_Top extends Plugin {
- private $host;
-
function about() {
return array(null,
"Force open article to the top",
@@ -9,7 +7,6 @@ class Hotkeys_Force_Top extends Plugin {
}
function init($host) {
- $this->host = $host;
}
diff --git a/plugins/hotkeys_noscroll/init.php b/plugins/hotkeys_noscroll/init.php
index 320847827..cc734941f 100644
--- a/plugins/hotkeys_noscroll/init.php
+++ b/plugins/hotkeys_noscroll/init.php
@@ -1,7 +1,5 @@
<?php
class Hotkeys_Noscroll extends Plugin {
- private $host;
-
function about() {
return array(null,
"n/p (and up/down) hotkeys move between articles without scrolling",
@@ -9,8 +7,6 @@ class Hotkeys_Noscroll extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
diff --git a/plugins/hotkeys_swap_jk/init.php b/plugins/hotkeys_swap_jk/init.php
index ff45a65e4..a365b777f 100644
--- a/plugins/hotkeys_swap_jk/init.php
+++ b/plugins/hotkeys_swap_jk/init.php
@@ -1,8 +1,6 @@
<?php
class Hotkeys_Swap_JK extends Plugin {
- private $host;
-
function about() {
return array(null,
"Swap j and k hotkeys (for vi brethren)",
@@ -10,8 +8,6 @@ class Hotkeys_Swap_JK extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
}
diff --git a/plugins/no_iframes/init.php b/plugins/no_iframes/init.php
index a8cef74ee..3cfa15915 100644
--- a/plugins/no_iframes/init.php
+++ b/plugins/no_iframes/init.php
@@ -1,6 +1,5 @@
<?php
class No_Iframes extends Plugin {
- private $host;
function about() {
return array(null,
@@ -9,8 +8,6 @@ class No_Iframes extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_SANITIZE, $this);
}
diff --git a/plugins/note/init.php b/plugins/note/init.php
index f95ba9fa8..bc3df64b1 100644
--- a/plugins/note/init.php
+++ b/plugins/note/init.php
@@ -1,9 +1,6 @@
<?php
class Note extends Plugin {
- /* @var PluginHost $host */
- private $host;
-
function about() {
return array(null,
"Adds support for setting article notes",
@@ -11,8 +8,6 @@ class Note extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
}
diff --git a/plugins/shorten_expanded/init.php b/plugins/shorten_expanded/init.php
index c097f1a0d..26208734e 100644
--- a/plugins/shorten_expanded/init.php
+++ b/plugins/shorten_expanded/init.php
@@ -1,6 +1,5 @@
<?php
class Shorten_Expanded extends Plugin {
- private $host;
function about() {
return array(null,
@@ -9,7 +8,7 @@ class Shorten_Expanded extends Plugin {
}
function init($host) {
- $this->host = $host;
+
}
function get_css() {
diff --git a/plugins/toggle_sidebar/init.php b/plugins/toggle_sidebar/init.php
index a6c919e03..312c7f11c 100644
--- a/plugins/toggle_sidebar/init.php
+++ b/plugins/toggle_sidebar/init.php
@@ -1,8 +1,6 @@
<?php
class Toggle_Sidebar extends Plugin {
- private $host;
-
function about() {
return array(null,
"Adds a main toolbar button to toggle sidebar",
@@ -10,8 +8,6 @@ class Toggle_Sidebar extends Plugin {
}
function init($host) {
- $this->host = $host;
-
$host->add_hook($host::HOOK_MAIN_TOOLBAR_BUTTON, $this);
}