@@ -43,15 +43,15 @@ final class Alert extends Widget
4343
4444 private array $ closeButtonAttributes = [];
4545
46- private string | null $ closeButtonTag = null ;
46+ private ? string $ closeButtonTag = null ;
4747
4848 private string $ closeButtonLabel = '' ;
4949
5050 private bool $ dismissable = false ;
5151
5252 private bool $ fade = false ;
5353
54- private string | null $ header = null ;
54+ private ? string $ header = null ;
5555
5656 private array $ headerAttributes = [];
5757
@@ -417,7 +417,7 @@ public function fade(bool $enabled): self
417417 * $alert->header('Header content');
418418 * ```
419419 */
420- public function header (string | null $ content , bool $ encode = true ): self
420+ public function header (? string $ content , bool $ encode = true ): self
421421 {
422422 if ($ encode ) {
423423 $ content = Html::encode ($ content );
@@ -562,7 +562,7 @@ public function render(): string
562562 '{header} ' => $ this ->renderHeader (),
563563 '{body} ' => $ this ->body ,
564564 '{toggler} ' => $ toggler ,
565- ]
565+ ],
566566 );
567567
568568 $ content = preg_replace ("/ \n{2}/ " , "\n" , $ content ) ?? '' ;
@@ -577,7 +577,7 @@ public function render(): string
577577 *
578578 * @psalm-return non-empty-string|null The generated ID.
579579 */
580- private function getId (): string | null
580+ private function getId (): ? string
581581 {
582582 return match ($ this ->id ) {
583583 true => $ this ->attributes ['id ' ] ?? Html::generateId (self ::NAME . '- ' ),
0 commit comments