summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-11-15 07:14:14 +0300
committerAndrew Dolgov <[email protected]>2021-11-15 07:14:14 +0300
commitacc5c6107a567c8862af4e3d518a598730c861af (patch)
treeef335aeca46afc752c59887e603afe97a5e4d710
parent083dfa0ca95124bebf23c22e89fdcb7d901319a5 (diff)
implement IVirtualFeed ; fix phpstan warnings
-rw-r--r--init.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/init.php b/init.php
index e51a5d2..c080e30 100644
--- a/init.php
+++ b/init.php
@@ -1,5 +1,5 @@
<?php
-class VF_Shared extends Plugin {
+class VF_Shared extends Plugin implements IVirtualFeed {
function about() {
return array(null,
@@ -16,7 +16,7 @@ class VF_Shared extends Plugin {
return 2;
}
- function get_unread($feed_id) {
+ function get_unread(int $feed_id) : int {
$sth = $this->pdo->prepare("select count(int_id) AS count
from ttrss_user_entries where owner_uid = ? and unread = true and uuid != ''");
$sth->execute([$_SESSION['uid']]);
@@ -28,7 +28,7 @@ class VF_Shared extends Plugin {
return 0;
}
- function get_total($feed_id) {
+ function get_total(int $feed_id) : int {
$sth = $this->pdo->prepare("select count(int_id) AS count
from ttrss_user_entries where owner_uid = ? and uuid != ''");
$sth->execute([$_SESSION['uid']]);
@@ -40,7 +40,7 @@ class VF_Shared extends Plugin {
return 0;
}
- function get_headlines($feed_id, $options) {
+ function get_headlines(int $feed_id, array $options) : array {
$params = array(
"feed" => -4,
"limit" => $options["limit"],