diff --git a/src/Factory/Api/Mastodon/Application.php b/src/Factory/Api/Mastodon/Application.php index edb88619ac..fb305e5e78 100644 --- a/src/Factory/Api/Mastodon/Application.php +++ b/src/Factory/Api/Mastodon/Application.php @@ -41,7 +41,6 @@ class Application extends BaseFactory * @param int $id Application ID * * @return \Friendica\Object\Api\Mastodon\Application - * * @throws UnprocessableEntityException */ public function createFromApplicationId(int $id): \Friendica\Object\Api\Mastodon\Application diff --git a/src/Factory/Api/Mastodon/Emoji.php b/src/Factory/Api/Mastodon/Emoji.php index 6161377849..17ec51580d 100644 --- a/src/Factory/Api/Mastodon/Emoji.php +++ b/src/Factory/Api/Mastodon/Emoji.php @@ -33,6 +33,7 @@ class Emoji extends BaseFactory /** * @param array $smilies + * * @return Emojis */ public function createCollectionFromSmilies(array $smilies): Emojis diff --git a/src/Factory/Api/Mastodon/Field.php b/src/Factory/Api/Mastodon/Field.php index 52d1a87d41..adfedde199 100644 --- a/src/Factory/Api/Mastodon/Field.php +++ b/src/Factory/Api/Mastodon/Field.php @@ -43,6 +43,7 @@ class Field extends BaseFactory /** * @param ProfileFields $profileFields + * * @return Fields * @throws HTTPException\InternalServerErrorException */ diff --git a/src/Factory/Api/Mastodon/Notification.php b/src/Factory/Api/Mastodon/Notification.php index 5bd2cca4c7..33c252e4f1 100644 --- a/src/Factory/Api/Mastodon/Notification.php +++ b/src/Factory/Api/Mastodon/Notification.php @@ -45,6 +45,12 @@ class Notification extends BaseFactory $this->mstdnStatusFactory = $mstdnStatusFactoryFactory; } + /** + * @param Notifications\Entity\Notification $Notification + * + * @return MstdnNotification + * @throws UnexpectedNotificationTypeException + */ public function createFromNotification(Notifications\Entity\Notification $Notification): MstdnNotification { $type = self::getType($Notification); diff --git a/src/Factory/Api/Mastodon/Poll.php b/src/Factory/Api/Mastodon/Poll.php index f1a9397230..4445b11d76 100644 --- a/src/Factory/Api/Mastodon/Poll.php +++ b/src/Factory/Api/Mastodon/Poll.php @@ -31,8 +31,11 @@ class Poll extends BaseFactory /** * @param int $id Id the question * @param int $uid Item user + * + * @return \Friendica\Object\Api\Mastodon\Poll + * @throws HTTPException\NotFoundException */ - public function createFromId(int $id, $uid = 0): \Friendica\Object\Api\Mastodon\Poll + public function createFromId(int $id, int $uid = 0): \Friendica\Object\Api\Mastodon\Poll { $question = Post\Question::getById($id); if (empty($question)) { diff --git a/src/Factory/Api/Mastodon/Relationship.php b/src/Factory/Api/Mastodon/Relationship.php index 6035b61f9c..6d78b50c21 100644 --- a/src/Factory/Api/Mastodon/Relationship.php +++ b/src/Factory/Api/Mastodon/Relationship.php @@ -31,6 +31,7 @@ class Relationship extends BaseFactory /** * @param int $contactId Contact ID (public or user contact) * @param int $uid User ID + * * @return RelationshipEntity * @throws Exception */ diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index 0fc9281dbe..0cce6cb037 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -78,7 +78,7 @@ class Status extends BaseFactory * @throws HTTPException\InternalServerErrorException * @throws ImagickException|HTTPException\NotFoundException */ - public function createFromUriId(int $uriId, $uid = 0): \Friendica\Object\Api\Mastodon\Status + public function createFromUriId(int $uriId, int $uid = 0): \Friendica\Object\Api\Mastodon\Status { $fields = ['uri-id', 'uid', 'author-id', 'author-uri-id', 'author-link', 'starred', 'app', 'title', 'body', 'raw-body', 'content-warning', 'question-id', 'created', 'network', 'thr-parent-id', 'parent-author-id', 'language', 'uri', 'plink', 'private', 'vid', 'gravity', 'featured', 'has-media']; diff --git a/src/Factory/Api/Mastodon/Tag.php b/src/Factory/Api/Mastodon/Tag.php index 87a6fd5c95..1b7eefe472 100644 --- a/src/Factory/Api/Mastodon/Tag.php +++ b/src/Factory/Api/Mastodon/Tag.php @@ -41,6 +41,7 @@ class Tag extends BaseFactory /** * @param int $uriId Uri-ID of the item + * * @return array * @throws HTTPException\InternalServerErrorException */ diff --git a/src/Factory/Api/Twitter/Attachment.php b/src/Factory/Api/Twitter/Attachment.php index b811c4824d..c5fa8d90a3 100644 --- a/src/Factory/Api/Twitter/Attachment.php +++ b/src/Factory/Api/Twitter/Attachment.php @@ -35,6 +35,7 @@ class Attachment extends BaseFactory /** * @param int $uriId Uri-ID of the attachments + * * @return array * @throws HTTPException\InternalServerErrorException */ diff --git a/src/Factory/Api/Twitter/Hashtag.php b/src/Factory/Api/Twitter/Hashtag.php index 14be6eb0b2..329d80207d 100644 --- a/src/Factory/Api/Twitter/Hashtag.php +++ b/src/Factory/Api/Twitter/Hashtag.php @@ -35,6 +35,8 @@ class Hashtag extends BaseFactory /** * @param int $uriId Uri-ID of the attachments + * @param string $text + * * @return array * @throws HTTPException\InternalServerErrorException */ diff --git a/src/Factory/Api/Twitter/Media.php b/src/Factory/Api/Twitter/Media.php index baf4650cff..ba588583c6 100644 --- a/src/Factory/Api/Twitter/Media.php +++ b/src/Factory/Api/Twitter/Media.php @@ -41,6 +41,8 @@ class Media extends BaseFactory /** * @param int $uriId Uri-ID of the attachments + * @param string $text + * * @return array * @throws HTTPException\InternalServerErrorException */ diff --git a/src/Factory/Api/Twitter/User.php b/src/Factory/Api/Twitter/User.php index f7040cefa9..6d4b8784ea 100644 --- a/src/Factory/Api/Twitter/User.php +++ b/src/Factory/Api/Twitter/User.php @@ -47,11 +47,12 @@ class User extends BaseFactory * @param int $uid Public contact (=0) or owner user id * @param bool $skip_status * @param bool $include_user_entities + * * @return \Friendica\Object\Api\Twitter\User * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public function createFromContactId(int $contactId, int $uid = 0, bool $skip_status = true, bool $include_user_entities = true) + public function createFromContactId(int $contactId, int $uid = 0, bool $skip_status = true, bool $include_user_entities = true): \Friendica\Object\Api\Twitter\User { $cdata = Contact::getPublicAndUserContactID($contactId, $uid); if (!empty($cdata)) { @@ -78,7 +79,14 @@ class User extends BaseFactory return new \Friendica\Object\Api\Twitter\User($publicContact, $apcontact, $userContact, $status, $include_user_entities); } - public function createFromUserId(int $uid, bool $skip_status = true, bool $include_user_entities = true) + /** + * @param int $uid Public contact (=0) or owner user id + * @param bool $skip_status + * @param bool $include_user_entities + * + * @return \Friendica\Object\Api\Twitter\User + */ + public function createFromUserId(int $uid, bool $skip_status = true, bool $include_user_entities = true): \Friendica\Object\Api\Twitter\User { return $this->createFromContactId(Contact::getPublicIdByUserId($uid), $uid, $skip_status, $include_user_entities); }