Merge "Make DBAccessBase use DBConnRef, rename $wiki, and hide getLoadBalancer()"
[lhc/web/wiklou.git] / includes / parser / PPFrame_DOM.php
index 00bfe98..a0ec326 100644 (file)
@@ -23,6 +23,7 @@
  * An expansion frame, used as a context to expand the result of preprocessToObj()
  * @deprecated since 1.34, use PPFrame_Hash
  * @ingroup Parser
+ * @phan-file-suppress PhanUndeclaredMethod
  */
 // phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
 class PPFrame_DOM implements PPFrame {
@@ -81,7 +82,7 @@ class PPFrame_DOM implements PPFrame {
         * 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
@@ -94,11 +95,12 @@ class PPFrame_DOM implements PPFrame {
                }
                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 ) {
@@ -152,7 +154,7 @@ class PPFrame_DOM implements PPFrame {
 
        /**
         * @throws MWException
-        * @param string|PPNode_DOM|DOMNode $root
+        * @param string|PPNode_DOM|DOMNode|DOMNodeList $root
         * @param int $flags
         * @return string
         */