[TOOLS][DOC] Add missing documentation, as flagged by doc-check

This commit is contained in:
Hugo Sales 2021-12-21 12:24:23 +00:00
parent da8c41e094
commit d6d5926b6e
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
4 changed files with 21 additions and 2 deletions

View File

@ -72,6 +72,9 @@ class Actor extends ActorController
);
}
/**
* View a group feed and give the option of creating it if it doesn't exist
*/
public function groupViewNickname(Request $request, string $nickname)
{
Nickname::validate($nickname, which: Nickname::CHECK_LOCAL_GROUP); // throws

View File

@ -38,6 +38,11 @@ use App\Util\Common;
abstract class FeedController extends Controller
{
/**
* Post process the result of a feed controller, to remove any
* notes or actors the user specified, as well as format the raw
* list of notes into a usable format
*/
public static function post_process(array $result)
{
$actor = Common::actor();

View File

@ -489,6 +489,9 @@ class Actor extends Entity
);
}
/**
* Get a URI for this actor, i.e. a unique and stable identifier, using the ID
*/
public function getUri(int $type = Router::ABSOLUTE_URL): string
{
$uri = null;
@ -511,6 +514,9 @@ class Actor extends Entity
return $uri;
}
/**
* Get a URL for this actor, i.e. a user friendly URL, using the nickname
*/
public function getUrl(int $type = Router::ABSOLUTE_URL): string
{
$url = null;

View File

@ -346,6 +346,11 @@ class Note extends Entity
));
}
/**
* Find all mentioned actors in this note
*
* @TODO: Seems rather inneficient to be rendering just for this
*/
public function getNotificationTargets(array $ids_already_known = []): array
{
$rendered = null;
@ -354,8 +359,8 @@ class Note extends Entity
$this->getContentType(),
&$rendered,
$this->getActor(),
is_null($this->getLanguageId()) ? null : Language::getById($this->getLanguageId())->getLocale(),
&$mentions]);
\is_null($this->getLanguageId()) ? null : Language::getById($this->getLanguageId())->getLocale(),
&$mentions, ]);
$mentioned = [];
foreach ($mentions as $mention) {
foreach ($mention['mentioned'] as $m) {