From 5f808051b2bdb2e43f16693ba19b20940944d556 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 14 Nov 2021 21:14:21 +0300 Subject: [PATCH] deal with phpstan warnings in auto_assign_labels and bookmarklets --- plugins/auto_assign_labels/init.php | 7 ++++++- plugins/bookmarklets/init.php | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/auto_assign_labels/init.php b/plugins/auto_assign_labels/init.php index 84fce8d64..b2e5718ea 100755 --- a/plugins/auto_assign_labels/init.php +++ b/plugins/auto_assign_labels/init.php @@ -11,7 +11,12 @@ class Auto_Assign_Labels extends Plugin { $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); } - function get_all_labels_filter_format($owner_uid) { + /** + * @param int $owner_uid + * @return array> + * @throws PDOException + */ + private function get_all_labels_filter_format(int $owner_uid) : array { $rv = array(); // TODO: use Labels::get_all() diff --git a/plugins/bookmarklets/init.php b/plugins/bookmarklets/init.php index 4bd527623..72aeb2c38 100644 --- a/plugins/bookmarklets/init.php +++ b/plugins/bookmarklets/init.php @@ -1,5 +1,7 @@