intelephense

1.14.41.16.1
lib/stub/dom/dom_c.php
lib/stub/dom/dom_c.php
+23−11
Index: package/lib/stub/dom/dom_c.php
===================================================================
--- package/lib/stub/dom/dom_c.php
+++ package/lib/stub/dom/dom_c.php
@@ -162,16 +162,17 @@
 
     /**
      * Adds a new child before a reference node
      * @link https://php.net/manual/en/domnode.insertbefore.php
-     * @param DOMNode $node <p>
+     * @template TNode of DOMNode
+     * @param TNode $node <p>
      * The new node.
      * </p>
      * @param null|DOMNode $child [optional] <p>
      * The reference node. If not supplied, newnode is
      * appended to the children.
      * </p>
-     * @return DOMNode The inserted node.
+     * @return TNode|false The inserted node.
      */
     public function insertBefore(
         DOMNode $node,
         #[LanguageLevelTypeAware(['8.0' => 'DOMNode|null'], default: 'DOMNode')] $child = null
@@ -179,37 +180,40 @@
 
     /**
      * Replaces a child
      * @link https://php.net/manual/en/domnode.replacechild.php
+     * @template TNode of DOMNode
      * @param DOMNode $node <p>
      * The new node. It must be a member of the target document, i.e.
      * created by one of the DOMDocument->createXXX() methods or imported in
      * the document by .
      * </p>
-     * @param DOMNode $child <p>
+     * @param TNode $child <p>
      * The old node.
      * </p>
-     * @return DOMNode|false The old node or false if an error occur.
+     * @return TNode|false The old node or false if an error occur.
      */
     public function replaceChild(DOMNode $node, DOMNode $child) {}
 
     /**
      * Removes child from list of children
      * @link https://php.net/manual/en/domnode.removechild.php
-     * @param DOMNode $child <p>
+     * @template TNode of DOMNode
+     * @param TNode $child <p>
      * The removed child.
      * </p>
-     * @return DOMNode If the child could be removed the functions returns the old child.
+     * @return TNode|false If the child could be removed the functions returns the old child.
      */
     public function removeChild(DOMNode $child) {}
 
     /**
      * Adds new child at the end of the children
      * @link https://php.net/manual/en/domnode.appendchild.php
-     * @param DOMNode $node <p>
+     * @template TNode of DOMNode
+     * @param TNode $node <p>
      * The appended child.
      * </p>
-     * @return DOMNode The node added.
+     * @return TNode|false The node added.
      */
     public function appendChild(DOMNode $node) {}
 
     /**
@@ -226,9 +230,9 @@
      * @param bool $deep <p>
      * Indicates whether to copy all descendant nodes. This parameter is
      * defaulted to false.
      * </p>
-     * @return static The cloned node.
+     * @return static|false The cloned node.
      */
     public function cloneNode(
         #[StubsElementAvailable(from: '5.3', to: '5.6')] $deep,
         #[StubsElementAvailable(from: '7.0')] #[LanguageLevelTypeAware(['8.0' => 'bool'], default: '')] $deep = false
@@ -850,8 +854,16 @@
     #[LanguageLevelTypeAware(['8.1' => 'DOMElement|null'], default: '')]
     public $firstElementChild;
 
     /**
+     * @var null
+     * The <classname>DOMDocument</classname> object associated with this node, or NULL if this node is a <classname>DOMDocument</classname>.
+     * @link https://php.net/manual/en/class.domnode.php#domnode.props.ownerdocument
+     */
+    #[LanguageLevelTypeAware(['8.1' => 'null'], default: '')]
+    public $ownerDocument;
+
+    /**
      * Create new element node
      * @link https://php.net/manual/en/domdocument.createelement.php
      * @param string $localName <p>
      * The tag name of the element.
@@ -1805,9 +1817,9 @@
      * @link https://php.net/manual/en/domelement.getattributenode.php
      * @param string $qualifiedName <p>
      * The name of the attribute.
      * </p>
-     * @return DOMAttr The attribute node.
+     * @return DOMAttr|false The attribute node or false if there is none.
      */
     public function getAttributeNode(#[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $qualifiedName) {}
 
     /**
@@ -1908,9 +1920,9 @@
      * </p>
      * @param string $localName <p>
      * The local name.
      * </p>
-     * @return DOMAttr The attribute node.
+     * @return DOMAttr|null The attribute node.
      */
     public function getAttributeNodeNS(
         #[LanguageLevelTypeAware(['8.0' => 'string|null'], default: '')] $namespace,
         #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $localName