N°8851 - Explicit nullable in functions parameters

This commit is contained in:
lenaick.moreira
2026-02-16 16:19:31 +01:00
committed by Lenaick
parent 2247691e58
commit 34c8a57814
82 changed files with 173 additions and 173 deletions

View File

@@ -126,7 +126,7 @@ class CKEditorHelper
*
* @return string|null
*/
public static function PrepareCKEditorValueTextEncodingForTextarea(string $sValue = null): ?string
public static function PrepareCKEditorValueTextEncodingForTextarea(?string $sValue = null): ?string
{
if ($sValue === null) {
return null;
@@ -145,7 +145,7 @@ class CKEditorHelper
*
* @return void
*/
public static function ConfigureCKEditorElementForWebPage(WebPage $oPage, string $sInputElementId, string $sInitialValue = null, bool $bWithMentions = false, array $aOverloadConfiguration = []): void
public static function ConfigureCKEditorElementForWebPage(WebPage $oPage, string $sInputElementId, ?string $sInitialValue = null, bool $bWithMentions = false, array $aOverloadConfiguration = []): void
{
// link CKEditor JS files
foreach (static::GetJSFilesRelPathsForCKEditor() as $sFile) {
@@ -187,7 +187,7 @@ class CKEditorHelper
*
* @return void
*/
public static function ConfigureCKEditorElementForRenderingOutput(RenderingOutput $oOutput, string $sInputElementId, string $sInitialValue = null, bool $bWithMentions = false, bool $bAddJSFiles = true, array $aOverloadConfiguration = []): void
public static function ConfigureCKEditorElementForRenderingOutput(RenderingOutput $oOutput, string $sInputElementId, ?string $sInitialValue = null, bool $bWithMentions = false, bool $bAddJSFiles = true, array $aOverloadConfiguration = []): void
{
// link CKEditor JS files
if ($bAddJSFiles) {
@@ -282,7 +282,7 @@ HTML;
* @throws \ConfigException
* @throws \CoreException
*/
public static function GetDOMSanitizerForCKEditor(DOMSanitizer $oSanitizer = null): array
public static function GetDOMSanitizerForCKEditor(?DOMSanitizer $oSanitizer = null): array
{
if ($oSanitizer === null) {
/* @var $oSanitizer DOMSanitizer */