]> git.mxchange.org Git - friendica.git/commitdiff
Fix code standards
authorMichael <heluecht@pirati.ca>
Mon, 29 Jan 2024 18:07:53 +0000 (18:07 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 29 Jan 2024 18:07:53 +0000 (18:07 +0000)
src/Model/Item.php
src/Model/Post/Engagement.php

index 000960a6fec848b909ac76f833a0bb6fb5ed812c..50aa68d7ef6c79fb078a6cb98ebea09fe8307353 100644 (file)
@@ -1448,7 +1448,7 @@ class Item
                        }
 
                        $engagement_uri_id = Post\Engagement::storeFromItem($posted_item);
-                       
+
                        if (in_array($posted_item['gravity'], [self::GRAVITY_PARENT, self::GRAVITY_COMMENT])) {
                                Post\SearchIndex::insert($posted_item['uri-id'], $posted_item['network'], $posted_item['private'], $posted_item['created']);
                        } elseif ($posted_item['verb'] == Activity::ANNOUNCE) {
@@ -1618,7 +1618,7 @@ class Item
                }
 
                $languages = $item['language'] ? array_keys(json_decode($item['language'], true)) : [];
-               
+
                foreach (Tag::getUIDListByURIId($item['uri-id']) as $uid => $tags) {
                        if (!empty($languages)) {
                                $keep = false;
index 388ab67b5e26fb731ff566c71b6f76e294739ae2..64f796ccc71c355e1ce8397d37a8157eae7dcf58 100644 (file)
@@ -188,7 +188,7 @@ class Engagement
 
                if (!empty($item['author-gsid'])) {
                        $gserver = DBA::selectFirst('gserver', ['platform', 'nurl'], ['id' => $item['author-gsid']]);
-                       $platform = preg_replace( '/[\W]/', '', $gserver['platform'] ?? '');
+                       $platform = preg_replace('/[\W]/', '', $gserver['platform'] ?? '');
                        if (!empty($platform)) {
                                $body .= ' platform_' . $platform;
                        }
@@ -197,7 +197,7 @@ class Engagement
 
                if (($item['owner-contact-type'] == Contact::TYPE_COMMUNITY) && !empty($item['owner-gsid']) && ($item['owner-gsid'] != ($item['author-gsid'] ?? 0))) {
                        $gserver = DBA::selectFirst('gserver', ['platform', 'nurl'], ['id' => $item['owner-gsid']]);
-                       $platform = preg_replace( '/[\W]/', '', $gserver['platform'] ?? '');
+                       $platform = preg_replace('/[\W]/', '', $gserver['platform'] ?? '');
                        if (!empty($platform) && !strpos($body, 'platform_' . $platform)) {
                                $body .= ' platform_' . $platform;
                        }
@@ -285,13 +285,13 @@ class Engagement
                                case Contact::TYPE_COMMUNITY:
                                        $prefix = ' group_';
                                        break;
-                               }
-                               $nick = $prefix . $reshare['author-nick'];
-                               $addr = $prefix . $reshare['author-addr'];
+                       }
+                       $nick = $prefix . $reshare['author-nick'];
+                       $addr = $prefix . $reshare['author-addr'];
 
-                               if (stripos($text, $addr) === false) {
-                                       $text .= $nick . $addr;
-                               }
+                       if (stripos($text, $addr) === false) {
+                               $text .= $nick . $addr;
+                       }
                }
                DBA::close($result);