From 6bd6a14c207ddaf35256b11dd381093d57ef38a4 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Sun, 14 Nov 2021 20:19:12 +0300
Subject: [PATCH] revise phpdoc annotations for hook_sanitize()

---
 classes/plugin.php                | 4 ++--
 plugins/af_youtube_embed/init.php | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/classes/plugin.php b/classes/plugin.php
index 290c4cc3b..55ccff9c3 100644
--- a/classes/plugin.php
+++ b/classes/plugin.php
@@ -232,7 +232,7 @@ abstract class Plugin {
 	 * @param array<string> $allowed_elements
 	 * @param array<string> $disallowed_attributes
 	 * @param int $article_id
-	 * @return DOMDocument
+	 * @return DOMDocument|array<int,DOMDocument|array<string>>
 	 */
 	function hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes, $article_id) {
 		user_error("Dummy method invoked.", E_USER_ERROR);
@@ -519,7 +519,7 @@ abstract class Plugin {
 
 	/**
 	 * @param string $url
-	 * @return string
+	 * @return string|false
 	 */
 	function hook_get_full_text($url) {
 		user_error("Dummy method invoked.", E_USER_ERROR);
diff --git a/plugins/af_youtube_embed/init.php b/plugins/af_youtube_embed/init.php
index a1be5562a..ff44bb291 100644
--- a/plugins/af_youtube_embed/init.php
+++ b/plugins/af_youtube_embed/init.php
@@ -32,6 +32,8 @@ class Af_Youtube_Embed extends Plugin {
 				</div>";
 
 		}
+
+		return "";
 	}
 
 	function api_version() {
-- 
GitLab