Uh oh!
There was an error while loading. Please reload this page.
Html: proper types for setHtml and addHtml methods – same as insert() method - #128
Html: proper types for setHtml and addHtml methods – same as insert() method#128vitkutny wants to merge 2 commits into
Conversation
ondrejmirtes
commented
Jul 12, 2023
Please show a piece of code for which "Nette\Utils\Html::insert(): Argument #2 ($child) must be of type Nette\HtmlStringable|string, XY given" is currently reported and which this PR should fix. Also - did you first try to send a PR to https://github.com/nette/utils? |
vitkutny
commented
Jul 13, 2023
namespaceNette\Utils;
class Html implements \ArrayAccess, \Countable, \IteratorAggregate, HtmlStringable
{
/** * Adds new element's child. */finalpublicfunctionaddHtml(mixed$child): static
{
return$this->insert(null, $child);
}
/** * Inserts child node. */publicfunctioninsert(?int$index, HtmlStringable|string$child, bool$replace = false): static
{
}
}
Right, I did not. I will :-) |
fixes
Nette\Utils\Html::insert(): Argument #2 ($child) must be of type Nette\HtmlStringable|string, XY given