From: Michael Date: Sat, 2 Sep 2023 10:21:23 +0000 (+0000) Subject: Fix Code Standards X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=15fc205d04d18f08954c4db94e532a9bf559b8a7;p=friendica.git Fix Code Standards --- diff --git a/src/Model/Post/Engagement.php b/src/Model/Post/Engagement.php index 55c5b3ba1c..040ba2f944 100644 --- a/src/Model/Post/Engagement.php +++ b/src/Model/Post/Engagement.php @@ -26,7 +26,6 @@ use Friendica\Core\Protocol; use Friendica\Database\Database; use Friendica\Database\DBA; use Friendica\DI; -use Friendica\Model\Contact; use Friendica\Model\Item; use Friendica\Model\Post; use Friendica\Model\Verb; @@ -37,6 +36,12 @@ use Friendica\Util\DateTimeFormat; class Engagement { + /** + * Store engagement data from an item array + * + * @param array $item + * @return void + */ public static function storeFromItem(array $item) { if (!in_array($item['network'], Protocol::FEDERATED)) { @@ -90,6 +95,11 @@ class Engagement Logger::debug('Engagement stored', ['fields' => $engagement, 'ret' => $ret]); } + /** + * Expire old engagement data + * + * @return void + */ public static function expire() { DBA::delete('post-engagement', ["`created` < ?", DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' hour')]);