From b7fe924bdd4b8bf53f86e0d268cda25b2bbdb0b6 Mon Sep 17 00:00:00 2001 From: Hugo Sales Date: Wed, 1 Dec 2021 12:24:22 +0000 Subject: [PATCH] [TOOLS][DOCS] Add missing doc blocks, as signaled by doc-checker --- components/Left/Controller/EditFeeds.php | 4 ++++ components/Tag/Tag.php | 5 +++++ plugins/RelatedTags/RelatedTags.php | 3 +++ 3 files changed, 12 insertions(+) diff --git a/components/Left/Controller/EditFeeds.php b/components/Left/Controller/EditFeeds.php index 1b2ebb6caa..5c4402d24e 100644 --- a/components/Left/Controller/EditFeeds.php +++ b/components/Left/Controller/EditFeeds.php @@ -42,6 +42,10 @@ use Symfony\Component\Routing\Exception\ResourceNotFoundException; class EditFeeds extends Controller { + /** + * Controller for editing the list of feeds in the user's left + * panel. Adds and removes `\App\Entity\Feed`s as appropriate + */ public function __invoke(Request $request) { $user = Common::ensureLoggedIn(); diff --git a/components/Tag/Tag.php b/components/Tag/Tag.php index a0366548fb..c582d2cea9 100644 --- a/components/Tag/Tag.php +++ b/components/Tag/Tag.php @@ -99,6 +99,11 @@ class Tag extends Component return mb_substr($tag, 0, self::MAX_TAG_LENGTH); } + /** + * Convert a tag to it's canonical representation, by splitting it + * into words, stemming it in the given language (if enabled) and + * sluggifying it (turning it into an ASCII representation) + */ public static function canonicalTag(string $tag, ?string $language): string { $result = ''; diff --git a/plugins/RelatedTags/RelatedTags.php b/plugins/RelatedTags/RelatedTags.php index b79dfd6854..272ebd34d1 100644 --- a/plugins/RelatedTags/RelatedTags.php +++ b/plugins/RelatedTags/RelatedTags.php @@ -32,6 +32,9 @@ use Symfony\Component\HttpFoundation\Request; class RelatedTags extends Plugin { + /** + * Add a pinnned block containing tags related to the current page, be it note tags or actor tags + */ public function onAddPinnedFeedContent(Request $request, array &$pinned) { $tags = $request->attributes->get('tags');