Skip to content

Commit

Permalink
Improve DOM extension types (vimeo#1965)
Browse files Browse the repository at this point in the history
* Improve DOM extension types

* fixup! Improve DOM extension types
  • Loading branch information
shiranai7 authored and 2e3s committed Sep 29, 2019
1 parent 0639097 commit 63a61dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Psalm/Internal/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,7 @@
'DOMNode::getNodePath' => ['?string'],
'DOMNode::hasAttributes' => ['bool'],
'DOMNode::hasChildNodes' => ['bool'],
'DOMNode::insertBefore' => ['DOMNode', 'newnode'=>'DOMNode', 'refnode='=>'DOMNode'],
'DOMNode::insertBefore' => ['DOMNode', 'newnode'=>'DOMNode', 'refnode='=>'DOMNode|null'],
'DOMNode::isDefaultNamespace' => ['bool', 'namespaceuri'=>'string'],
'DOMNode::isSameNode' => ['bool', 'node'=>'DOMNode'],
'DOMNode::isSupported' => ['bool', 'feature'=>'string', 'version'=>'string'],
Expand Down Expand Up @@ -2193,8 +2193,8 @@
'domxml_xslt_stylesheet_file' => ['DomXsltStylesheet', 'xsl_file'=>'string'],
'domxml_xslt_version' => ['int'],
'DOMXPath::__construct' => ['void', 'doc'=>'DOMDocument'],
'DOMXPath::evaluate' => ['mixed', 'expression'=>'string', 'contextnode='=>'DOMNode', 'registernodens='=>'bool'],
'DOMXPath::query' => ['false|DOMNodeList', 'expression'=>'string', 'contextnode='=>'DOMNode', 'registernodens='=>'bool'],
'DOMXPath::evaluate' => ['mixed', 'expression'=>'string', 'contextnode='=>'DOMNode|null', 'registernodens='=>'bool'],
'DOMXPath::query' => ['false|DOMNodeList', 'expression'=>'string', 'contextnode='=>'DOMNode|null', 'registernodens='=>'bool'],
'DOMXPath::registerNamespace' => ['bool', 'prefix'=>'string', 'namespaceuri'=>'string'],
'DOMXPath::registerPhpFunctions' => ['void', 'restrict='=>'mixed'],
'DomXsltStylesheet::process' => ['DomDocument', 'xml_doc'=>'DOMDocument', 'xslt_params='=>'array', 'is_xpath_param='=>'bool', 'profile_filename='=>'string'],
Expand Down
17 changes: 10 additions & 7 deletions src/Psalm/Internal/PropertyMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@
'xmlEncoding' => 'string',
'xmlStandalone' => 'bool',
'xmlVersion' => 'string',
'ownerDocument' => 'null',
'parentNode' => 'null',
],
'libxmlerror' => [
'level' => 'int',
Expand Down Expand Up @@ -266,6 +268,7 @@
'domelement' => [
'schemaTypeInfo' => 'bool',
'tagName' => 'string',
'attributes' => 'DOMNamedNodeMap',
],
'tidynode' => [
'value' => 'string',
Expand Down Expand Up @@ -319,16 +322,16 @@
'nodeType' => 'int',
'parentNode' => 'DOMNode',
'childNodes' => 'DOMNodeList',
'firstChild' => 'DOMNode',
'lastChild' => 'DOMNode',
'previousSibling' => 'DOMNode',
'nextSibling' => 'DOMNode',
'attributes' => 'DOMNamedNodeMap',
'firstChild' => 'DOMNode|null',
'lastChild' => 'DOMNode|null',
'previousSibling' => 'DOMNode|null',
'nextSibling' => 'DOMNode|null',
'attributes' => 'null',
'ownerDocument' => 'DOMDocument',
'namespaceURI' => 'string',
'namespaceURI' => 'string|null',
'prefix' => 'string',
'localName' => 'string',
'baseURI' => 'string',
'baseURI' => 'string|null',
'textContent' => 'string',
],
'domattr' => [
Expand Down

0 comments on commit 63a61dd

Please sign in to comment.