mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-16 22:08:44 +02:00
N°8681 - Enforce type hint for parameters and return value
This commit is contained in:
@@ -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 ?? '';
|
||||
|
||||
@@ -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 ?? '';
|
||||
|
||||
Reference in New Issue
Block a user