]> git.mxchange.org Git - friendica.git/blobdiff - src/Factory/Api/Mastodon/Mention.php
Tests ...
[friendica.git] / src / Factory / Api / Mastodon / Mention.php
index cf863472c6f3f5080bab1c4c759fed1a2d712f28..597f205db8f0338f910308ae956f8d806d579bc6 100644 (file)
@@ -45,15 +45,14 @@ class Mention extends BaseFactory
         * @param int $uriId Uri-ID of the item
         * @return Mentions
         * @throws HTTPException\InternalServerErrorException
-        * @throws \ImagickException
         */
-       public function createFromUriId(int $uriId)
+       public function createFromUriId(int $uriId): Mentions
        {
                $mentions = new Mentions();
-               $tags = Tag::getByURIId($uriId, [Tag::MENTION, Tag::EXCLUSIVE_MENTION, Tag::IMPLICIT_MENTION]);
+               $tags     = Tag::getByURIId($uriId, [Tag::MENTION, Tag::EXCLUSIVE_MENTION, Tag::IMPLICIT_MENTION]);
                foreach ($tags as $tag) {
-                       $contact = Contact::getByURL($tag['url'], false);
-                       $mentions->append(new \Friendica\Object\Api\Mastodon\Mention($this->baseUrl, $tag, $contact));
+                       $contact    = Contact::getByURL($tag['url'], false);
+                       $mentions[] = new \Friendica\Object\Api\Mastodon\Mention($this->baseUrl, $tag, $contact);
                }
                return $mentions;
        }