deal with phpstan warnings in auto_assign_labels and bookmarklets
This commit is contained in:
parent
f537502fce
commit
5f808051b2
|
@ -11,7 +11,12 @@ class Auto_Assign_Labels extends Plugin {
|
||||||
$host->add_hook($host::HOOK_ARTICLE_FILTER, $this);
|
$host->add_hook($host::HOOK_ARTICLE_FILTER, $this);
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_all_labels_filter_format($owner_uid) {
|
/**
|
||||||
|
* @param int $owner_uid
|
||||||
|
* @return array<int, array<int, int|string>>
|
||||||
|
* @throws PDOException
|
||||||
|
*/
|
||||||
|
private function get_all_labels_filter_format(int $owner_uid) : array {
|
||||||
$rv = array();
|
$rv = array();
|
||||||
|
|
||||||
// TODO: use Labels::get_all()
|
// TODO: use Labels::get_all()
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class Bookmarklets extends Plugin {
|
class Bookmarklets extends Plugin {
|
||||||
|
|
||||||
|
/** @var PluginHost $host */
|
||||||
private $host;
|
private $host;
|
||||||
|
|
||||||
function about() {
|
function about() {
|
||||||
|
@ -20,7 +22,7 @@ class Bookmarklets extends Plugin {
|
||||||
return in_array($method, ["subscribe", "sharepopup"]);
|
return in_array($method, ["subscribe", "sharepopup"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function subscribe() {
|
function subscribe() : void {
|
||||||
if (Config::get(Config::SINGLE_USER_MODE)) {
|
if (Config::get(Config::SINGLE_USER_MODE)) {
|
||||||
UserHelper::login_sequence();
|
UserHelper::login_sequence();
|
||||||
}
|
}
|
||||||
|
@ -171,7 +173,7 @@ class Bookmarklets extends Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sharepopup() {
|
function sharepopup() : void {
|
||||||
if (Config::get(Config::SINGLE_USER_MODE)) {
|
if (Config::get(Config::SINGLE_USER_MODE)) {
|
||||||
UserHelper::login_sequence();
|
UserHelper::login_sequence();
|
||||||
}
|
}
|
||||||
|
@ -332,7 +334,6 @@ class Bookmarklets extends Plugin {
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function hook_prefs_tab($args) {
|
function hook_prefs_tab($args) {
|
||||||
if ($args != "prefFeeds")
|
if ($args != "prefFeeds")
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue