* Create a new child frame
* $args is optionally a multi-root PPNode or array containing the template arguments
*
- * @param bool|array $args
+ * @param bool|array|PPNode_DOM $args
* @param Title|bool $title
* @param int $indexOffset
* @return PPTemplateFrame_DOM
}
if ( $args !== false ) {
$xpath = false;
- if ( $args instanceof PPNode ) {
+ if ( $args instanceof PPNode_DOM ) {
$args = $args->node;
}
+ // @phan-suppress-next-line PhanTypeSuspiciousNonTraversableForeach
foreach ( $args as $arg ) {
- if ( $arg instanceof PPNode ) {
+ if ( $arg instanceof PPNode_DOM ) {
$arg = $arg->node;
}
if ( !$xpath || $xpath->document !== $arg->ownerDocument ) {
/**
* @throws MWException
- * @param string|PPNode_DOM|DOMNode $root
+ * @param string|PPNode_DOM|DOMNode|DOMNodeList $root
* @param int $flags
* @return string
*/