From 87a30d88d36941ad817f0d1409e2ededbe576af6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 10 Nov 2021 20:58:40 +0300 Subject: [PATCH] plugin cleanup re: phpstan 1.0 warnings --- plugins/af_comics/init.php | 3 --- plugins/af_redditimgur/init.php | 1 + plugins/af_youtube_embed/init.php | 3 --- plugins/af_zz_vidmute/init.php | 5 ++--- plugins/auth_internal/init.php | 5 ----- plugins/auth_remote/init.php | 5 ----- plugins/auto_assign_labels/init.php | 5 ----- plugins/hotkeys_force_top/init.php | 3 --- plugins/hotkeys_noscroll/init.php | 4 ---- plugins/hotkeys_swap_jk/init.php | 4 ---- plugins/no_iframes/init.php | 3 --- plugins/note/init.php | 5 ----- plugins/shorten_expanded/init.php | 3 +-- plugins/toggle_sidebar/init.php | 4 ---- 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ host = $host; - $host->add_hook($host::HOOK_MAIN_TOOLBAR_BUTTON, $this); }