summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-10-22 13:49:08 +0300
committerAndrew Dolgov <[email protected]>2021-10-22 13:49:08 +0300
commit9f734c90506a6e5916589d7c8f39c45ff40f6273 (patch)
treefc75d5462141e6f10558932f1ab003c3010b8115 /classes
parent3b70d1f62275752c966e778dec0c20e67d176f03 (diff)
minor phpstan tweaks
Diffstat (limited to 'classes')
-rwxr-xr-xclasses/api.php2
-rwxr-xr-xclasses/feeditem/common.php1
-rwxr-xr-xclasses/handler/public.php4
3 files changed, 6 insertions, 1 deletions
diff --git a/classes/api.php b/classes/api.php
index 5f825e551..033aa8654 100755
--- a/classes/api.php
+++ b/classes/api.php
@@ -307,6 +307,7 @@ class API extends Handler {
$article_ids = explode(',', clean($_REQUEST['article_id'] ?? ''));
$sanitize_content = self::_param_to_bool($_REQUEST['sanitize'] ?? true);
+ // @phpstan-ignore-next-line
if (count($article_ids)) {
$entries = ORM::for_table('ttrss_entries')
->table_alias('e')
@@ -369,7 +370,6 @@ class API extends Handler {
}
$this->_wrap(self::STATUS_OK, $articles);
- // @phpstan-ignore-next-line
} else {
$this->_wrap(self::STATUS_ERR, ['error' => self::E_INCORRECT_USAGE]);
}
diff --git a/classes/feeditem/common.php b/classes/feeditem/common.php
index 18afeaa94..b4774941f 100755
--- a/classes/feeditem/common.php
+++ b/classes/feeditem/common.php
@@ -190,6 +190,7 @@ abstract class FeedItem_Common extends FeedItem {
}, $tmp);
// remove empty values
+ // @phpstan-ignore-next-line
$tmp = array_filter($tmp, 'strlen');
asort($tmp);
diff --git a/classes/handler/public.php b/classes/handler/public.php
index b9619971b..14474d0bb 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -53,6 +53,10 @@ class Handler_Public extends Handler {
if ($handler) {
$qfh_ret = $handler->get_headlines(PluginHost::feed_to_pfeed_id((int)$feed), $params);
+ } else {
+ user_error("Failed to find handler for plugin feed ID: $feed", E_USER_ERROR);
+
+ return false;
}
} else {