summaryrefslogtreecommitdiff
path: root/plugins/nsfw
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-11-14 21:20:59 +0300
committerAndrew Dolgov <[email protected]>2021-11-14 21:20:59 +0300
commit242cf916eff84325c4ab30fdc4dc24292ab6127f (patch)
tree24653232507f34c905f2be815c75f02bc83c09f2 /plugins/nsfw
parent5f808051b2bdb2e43f16693ba19b20940944d556 (diff)
deal with phpstan warnings in plugins/note, nsfw, and share
Diffstat (limited to 'plugins/nsfw')
-rw-r--r--plugins/nsfw/init.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/nsfw/init.php b/plugins/nsfw/init.php
index fc38fef71..a349ceac0 100644
--- a/plugins/nsfw/init.php
+++ b/plugins/nsfw/init.php
@@ -1,5 +1,7 @@
<?php
class NSFW extends Plugin {
+
+ /** @var PluginHost $host */
private $host;
function about() {
@@ -31,7 +33,12 @@ class NSFW extends Plugin {
}
}
- private function rewrite_contents($article) {
+ /**
+ * @param array<string, mixed> $article
+ * @return array<string,mixed>
+ * @throws PDOException
+ */
+ private function rewrite_contents(array $article) : array {
$tags = explode(",", $this->host->get($this, "tags"));
$article_tags = $article["tags"];
@@ -101,7 +108,7 @@ class NSFW extends Plugin {
<?php
}
- function save() {
+ function save() : void {
$tags = implode(", ",
FeedItem_Common::normalize_categories(explode(",", $_POST["tags"] ?? "")));