diff options
author | Andrew Dolgov <[email protected]> | 2021-11-18 07:32:28 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-11-18 07:32:28 +0300 |
commit | 63ec5a89657bb7f9650582b96e0bb255a0889b48 (patch) | |
tree | 074b61eedd7304ba1d8d7deec01d26973ef8e6b8 /classes/digest.php | |
parent | 3a3fde1a2e0beac6d179c6449eaad726100710d7 (diff) | |
parent | 2d830c6281c19a7ee29cd379f5aedc82deef3775 (diff) |
Merge branch 'wip-phpstan-level6'
Diffstat (limited to 'classes/digest.php')
-rw-r--r-- | classes/digest.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/classes/digest.php b/classes/digest.php index 94e5cd1fc..15203166b 100644 --- a/classes/digest.php +++ b/classes/digest.php @@ -1,7 +1,7 @@ <?php class Digest { - static function send_headlines_digests() { + static function send_headlines_digests(): void { $user_limit = 15; // amount of users to process (e.g. emails to send out) $limit = 1000; // maximum amount of headlines to include @@ -62,7 +62,7 @@ class Digest if ($rc && $do_catchup) { Debug::log("Marking affected articles as read..."); - Article::_catchup_by_id($affected_ids, 0, $line["id"]); + Article::_catchup_by_id($affected_ids, Article::CATCHUP_MODE_MARK_AS_READ, $line["id"]); } } else { Debug::log("No headlines"); @@ -78,6 +78,9 @@ class Digest Debug::log("All done."); } + /** + * @return array{0: string, 1: int, 2: array<int>, 3: string} + */ static function prepare_headlines_digest(int $user_id, int $days = 1, int $limit = 1000) { $tpl = new Templator(); |