N°8851 - Explicit nullable in functions parameters (#857)

This commit is contained in:
Lenaick
2026-03-26 15:52:57 +01:00
committed by GitHub
parent 398b47d5d1
commit aae6d324f9
42 changed files with 52 additions and 52 deletions

View File

@@ -22,7 +22,7 @@ class TurboForm extends UIContentBlock
protected ?string $sAction;
private FormView $oFormView;
public function __construct(FormView $oFormView, string $sId = null)
public function __construct(FormView $oFormView, ?string $sId = null)
{
parent::__construct($sId);
$this->oFormView = $oFormView;

View File

@@ -36,7 +36,7 @@ class TurboFormUIBlockFactory extends AbstractUIBlockFactory
*
* @return \Combodo\iTop\Application\UI\Base\Component\TurboForm\TurboForm An HTML form in which you can add UIBlocks
*/
public static function MakeStandard(FormView $oFormView, string $sAction = null, string $sId = null): TurboForm
public static function MakeStandard(FormView $oFormView, ?string $sAction = null, ?string $sId = null): TurboForm
{
$oTurboForm = new TurboForm($oFormView, $sId);
if (!is_null($sAction)) {
@@ -57,7 +57,7 @@ class TurboFormUIBlockFactory extends AbstractUIBlockFactory
* @return \Combodo\iTop\Application\UI\Base\Component\TurboForm\TurboForm
* @throws \Combodo\iTop\Forms\Block\FormBlockException
*/
public static function MakeForDashletConfiguration(string $sDashletId, array $aData = [], string $sId = null): TurboForm
public static function MakeForDashletConfiguration(string $sDashletId, array $aData = [], ?string $sId = null): TurboForm
{
$oBlockForm = FormBlockService::GetInstance()->GetFormBlockById($sDashletId, 'Dashlet');
$oController = new FormsController();

View File

@@ -16,7 +16,7 @@ class TurboStream extends UIContentBlock
private string $sTarget;
private string $sAction;
public function __construct(string $sTarget, string $sAction, string $sId = null)
public function __construct(string $sTarget, string $sAction, ?string $sId = null)
{
parent::__construct($sId);
$this->sTarget = $sTarget;

View File

@@ -31,7 +31,7 @@ class TurboStreamUIBlockFactory extends AbstractUIBlockFactory
*
* @return \Combodo\iTop\Application\UI\Base\Component\TurboUpdate\TurboStream An HTML form in which you can add UIBlocks
*/
public static function MakeUpdate(string $sTarget, string $sId = null): TurboStream
public static function MakeUpdate(string $sTarget, ?string $sId = null): TurboStream
{
return new TurboStream($sTarget, 'update', $sId);
}
@@ -44,7 +44,7 @@ class TurboStreamUIBlockFactory extends AbstractUIBlockFactory
*
* @return \Combodo\iTop\Application\UI\Base\Component\TurboUpdate\TurboStream An HTML form in which you can add UIBlocks
*/
public static function MakeReplace(string $sTarget, string $sId = null): TurboStream
public static function MakeReplace(string $sTarget, ?string $sId = null): TurboStream
{
return new TurboStream($sTarget, 'replace', $sId);
}
@@ -57,7 +57,7 @@ class TurboStreamUIBlockFactory extends AbstractUIBlockFactory
*
* @return \Combodo\iTop\Application\UI\Base\Component\TurboUpdate\TurboStream An HTML form in which you can add UIBlocks
*/
public static function MakePrepend(string $sTarget, string $sId = null): TurboStream
public static function MakePrepend(string $sTarget, ?string $sId = null): TurboStream
{
return new TurboStream($sTarget, 'prepend', $sId);
}
@@ -70,7 +70,7 @@ class TurboStreamUIBlockFactory extends AbstractUIBlockFactory
*
* @return \Combodo\iTop\Application\UI\Base\Component\TurboUpdate\TurboStream An HTML form in which you can add UIBlocks
*/
public static function MakeAppend(string $sTarget, string $sId = null): TurboStream
public static function MakeAppend(string $sTarget, ?string $sId = null): TurboStream
{
return new TurboStream($sTarget, 'append', $sId);
}