utils
utils copied to clipboard
Incorrect argument type definition in `addHtml` method
Version: latest
Bug Description
Method addHtml() has mixed type definition, which is incorrect. In fact it really expects HtmlStringable|string, because of inner call of ->insert().
~The same applies to addText().~
Steps To Reproduce
Html::el('span')->addHtml(0); // results in following TypeError
TypeError Nette\Utils\Html::insert(): Argument #2 ($child) must be of type Nette\HtmlStringable|string, int given
Expected Behavior
No type error being thrown
Please send PR