Skip to content

Commit ad7c562

Browse files
committed
Html: improved type hints [Closes nette/nette#1570]
1 parent 4886c12 commit ad7c562

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Utils/Html.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ final public function getText(): string
573573
/**
574574
* Adds new element's child.
575575
*/
576-
final public function addHtml(mixed $child): static
576+
final public function addHtml(HtmlStringable|string $child): static
577577
{
578578
return $this->insert(null, $child);
579579
}
@@ -582,7 +582,7 @@ final public function addHtml(mixed $child): static
582582
/**
583583
* Appends plain-text string to element content.
584584
*/
585-
public function addText(mixed $text): static
585+
public function addText(\Stringable|string $text): static
586586
{
587587
if (!$text instanceof HtmlStringable) {
588588
$text = htmlspecialchars((string) $text, ENT_NOQUOTES, 'UTF-8');

0 commit comments

Comments
 (0)