1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-16 04:15:57 +00:00

deal with phpstan warnings in plugins/note, nsfw, and share

This commit is contained in:
Andrew Dolgov
2021-11-14 21:20:59 +03:00
parent 5f808051b2
commit 242cf916ef
3 changed files with 12 additions and 8 deletions

View File

@@ -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"] ?? "")));