]> git.mxchange.org Git - friendica.git/commitdiff
Fix Code Standards
authorMichael <heluecht@pirati.ca>
Sat, 2 Sep 2023 10:21:23 +0000 (10:21 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 2 Sep 2023 10:21:23 +0000 (10:21 +0000)
src/Model/Post/Engagement.php

index 55c5b3ba1c712972ed9d078c09bae66b822a091e..040ba2f944769a30545b3700df31c9706692bd92 100644 (file)
@@ -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')]);