N°8681 - Enforce type hint for parameters and return value

This commit is contained in:
Molkobain
2026-02-17 20:55:55 +01:00
parent a5296e11e1
commit 3fdbcbc0fb
2 changed files with 17 additions and 3 deletions

View File

@@ -259,12 +259,14 @@ class InlineImage extends DBObject
* that refer to an InlineImage (detected via the attribute data-img-id="") so that
* the URL is consistent with the current URL of the application.
*
* @param string $sHtml The HTML fragment to process
N°8681 * @param string|null $sHtml The HTML fragment to process
*
* @return string The modified HTML
* @throws \Exception
*
* @since 3.3.0 N°8681 Add type hint for parameters and return value
*/
public static function FixUrls($sHtml)
public static function FixUrls(string|null $sHtml): string
{
// N°8681 - Ensure to have a string value
$sHtml = $sHtml ?? '';

View File

@@ -95,7 +95,19 @@ class AttributeText extends AttributeString
return 65535;
}
public static function RenderWikiHtml($sText, $bWikiOnly = false)
/**
* @param string|null $sText
* @param bool $bWikiOnly
*
* @return string
* @throws \ArchivedObjectException
* @throws \ConfigException
* @throws \CoreException
* @throws \DictExceptionMissingString
*
* @since 3.3.0 N°8681 Add type hint for parameters and return value
*/
public static function RenderWikiHtml(string|null $sText, bool $bWikiOnly = false): string
{
// N°8681 - Ensure to have a string value
$sText = $sText ?? '';