]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Conversation.php
Funkwhale context file moved
[friendica.git] / src / Model / Conversation.php
index 742d5230a358b04ba2675d4903738295cd60fa1a..7d8b8058f10c8431561132758cecc258dd24476c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -38,7 +38,7 @@ class Conversation
        const PARCEL_SALMON             = 3;
        const PARCEL_FEED               = 4; // Deprecated
        const PARCEL_SPLIT_CONVERSATION = 6;
-       const PARCEL_LEGACY_DFRN        = 7;
+       const PARCEL_LEGACY_DFRN        = 7; // @deprecated since version 2021.09
        const PARCEL_DIASPORA_DFRN      = 8;
        const PARCEL_LOCAL_DFRN         = 9;
        const PARCEL_DIRECT             = 10;
@@ -62,7 +62,7 @@ class Conversation
         */
        const RELAY   = 3;
 
-       public static function getByItemUri($item_uri)
+       public static function getByItemUri(string $item_uri)
        {
                return DBA::selectFirst('conversation', [], ['item-uri' => $item_uri]);
        }
@@ -74,7 +74,7 @@ class Conversation
         * @return array Item array with removed conversation data
         * @throws \Exception
         */
-       public static function insert(array $arr)
+       public static function insert(array $arr): array
        {
                if (in_array(($arr['network'] ?? '') ?: Protocol::PHANTOM,
                        [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS, Protocol::TWITTER]) && !empty($arr['uri'])) {