summaryrefslogtreecommitdiff
path: root/classes/api.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-09-29 20:02:59 +0300
committerAndrew Dolgov <[email protected]>2022-09-29 20:02:59 +0300
commit42bc1620b8deda73b96b2e0029c6de79daa5ccca (patch)
tree1481290a1e82e3caade53741165cffa41432cef2 /classes/api.php
parent3545d3ba83a486b077b2d1d141ea871bb47a29fb (diff)
make phpstan happy
Diffstat (limited to 'classes/api.php')
-rwxr-xr-xclasses/api.php20
1 files changed, 12 insertions, 8 deletions
diff --git a/classes/api.php b/classes/api.php
index 2416dd7c9..262d5c5bc 100755
--- a/classes/api.php
+++ b/classes/api.php
@@ -550,9 +550,10 @@ class API extends Handler {
foreach ($vfeeds as $feed) {
if (!implements_interface($feed['sender'], 'IVirtualFeed'))
continue;
-
+
+ /** @var IVirtualFeed $feed['sender'] */
$unread = $feed['sender']->get_unread($feed['id']);
-
+
if ($unread || !$unread_only) {
$row = [
'id' => PluginHost::pfeed_to_feed_id($feed['id']),
@@ -697,11 +698,14 @@ class API extends Handler {
"skip_first_id_check" => $skip_first_id_check
);
+ $qfh_ret = [];
+
if (!$is_cat && is_numeric($feed_id) && $feed_id < PLUGIN_FEED_BASE_INDEX && $feed_id > LABEL_BASE_INDEX) {
- /** @var IVirtualFeed|false $handler */
$pfeed_id = PluginHost::feed_to_pfeed_id($feed_id);
+
+ /** @var IVirtualFeed|false $handler */
$handler = PluginHost::getInstance()->get_feed_handler($pfeed_id);
-
+
if ($handler) {
$params = array(
"feed" => $feed_id,
@@ -716,12 +720,12 @@ class API extends Handler {
"check_first_id" => $check_first_id,
"skip_first_id_check" => $skip_first_id_check
);
-
+
$qfh_ret = $handler->get_headlines($pfeed_id, $params);
}
-
+
} else {
-
+
$params = array(
"feed" => $feed_id,
"limit" => $limit,
@@ -735,7 +739,7 @@ class API extends Handler {
"check_first_id" => $check_first_id,
"skip_first_id_check" => $skip_first_id_check
);
-
+
$qfh_ret = Feeds::_get_headlines($params);
}