deal with phpstan warnings in plugins/note, nsfw, and share
This commit is contained in:
parent
5f808051b2
commit
242cf916ef
|
@ -21,7 +21,7 @@ class Note extends Plugin {
|
|||
style='cursor : pointer' title='".__('Edit article note')."'>note</i>";
|
||||
}
|
||||
|
||||
function edit() {
|
||||
function edit() : void {
|
||||
$id = clean($_REQUEST['id']);
|
||||
|
||||
$sth = $this->pdo->prepare("SELECT note FROM ttrss_user_entries WHERE
|
||||
|
@ -49,7 +49,7 @@ class Note extends Plugin {
|
|||
<?php
|
||||
}
|
||||
|
||||
function setNote() {
|
||||
function setNote() : void {
|
||||
$id = (int)clean($_REQUEST["id"]);
|
||||
$note = clean($_REQUEST["note"]);
|
||||
|
||||
|
|
|
@ -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"] ?? "")));
|
||||
|
||||
|
|
|
@ -194,10 +194,7 @@ class Share extends Plugin {
|
|||
strip_tags($content_decoded)
|
||||
)
|
||||
), 500, "...")) ?>">
|
||||
|
||||
<?php if ($og_image) { ?>
|
||||
<meta property='og:image' content="<?= htmlspecialchars($og_image) ?>">
|
||||
<?php } ?>
|
||||
<meta property='og:image' content="<?= htmlspecialchars($og_image) ?>">
|
||||
</head>
|
||||
|
||||
<body class='flat ttrss_utility ttrss_zoom css_loading'>
|
||||
|
|
Loading…
Reference in New Issue