mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Merge pull request #10073 from weirdan/fix-domdocument-signatures
Fixed `DOMDocument::load*` signatures
This commit is contained in:
commit
2c39046737
@ -1679,10 +1679,10 @@ return [
|
||||
'DOMDocument::getElementsByTagName' => ['DOMNodeList', 'qualifiedName'=>'string'],
|
||||
'DOMDocument::getElementsByTagNameNS' => ['DOMNodeList', 'namespace'=>'?string', 'localName'=>'string'],
|
||||
'DOMDocument::importNode' => ['DOMNode|false', 'node'=>'DOMNode', 'deep='=>'bool'],
|
||||
'DOMDocument::load' => ['DOMDocument|bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'DOMDocument::load' => ['bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'DOMDocument::loadHTML' => ['bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'DOMDocument::loadHTMLFile' => ['bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'DOMDocument::loadXML' => ['DOMDocument|bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'DOMDocument::loadXML' => ['bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'DOMDocument::normalizeDocument' => ['void'],
|
||||
'DOMDocument::registerNodeClass' => ['bool', 'baseClass'=>'string', 'extendedClass'=>'?string'],
|
||||
'DOMDocument::relaxNGValidate' => ['bool', 'filename'=>'string'],
|
||||
|
@ -100,6 +100,22 @@ return [
|
||||
'old' => ['DOMNodeList', 'namespace'=>'string', 'localName'=>'string'],
|
||||
'new' => ['DOMNodeList', 'namespace'=>'?string', 'localName'=>'string'],
|
||||
],
|
||||
'DOMDocument::load' => [
|
||||
'old' => ['DOMDocument|bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'new' => ['bool', 'filename'=>'string', 'options='=>'int'],
|
||||
],
|
||||
'DOMDocument::loadXML' => [
|
||||
'old' => ['DOMDocument|bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'new' => ['bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
],
|
||||
'DOMDocument::loadHTML' => [
|
||||
'old' => ['DOMDocument|bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'new' => ['bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
],
|
||||
'DOMDocument::loadHTMLFile' => [
|
||||
'old' => ['DOMDocument|bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'new' => ['bool', 'filename'=>'string', 'options='=>'int'],
|
||||
],
|
||||
'DOMImplementation::createDocument' => [
|
||||
'old' => ['DOMDocument|false', 'namespace='=>'string', 'qualifiedName='=>'string', 'doctype='=>'DOMDocumentType'],
|
||||
'new' => ['DOMDocument|false', 'namespace='=>'?string', 'qualifiedName='=>'string', 'doctype='=>'?DOMDocumentType'],
|
||||
|
@ -733,8 +733,8 @@ return [
|
||||
'DOMDocument::getElementsByTagNameNS' => ['DOMNodeList', 'namespace'=>'string', 'localName'=>'string'],
|
||||
'DOMDocument::importNode' => ['DOMNode|false', 'node'=>'DOMNode', 'deep='=>'bool'],
|
||||
'DOMDocument::load' => ['DOMDocument|bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'DOMDocument::loadHTML' => ['bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'DOMDocument::loadHTMLFile' => ['bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'DOMDocument::loadHTML' => ['DOMDocument|bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'DOMDocument::loadHTMLFile' => ['DOMDocument|bool', 'filename'=>'string', 'options='=>'int'],
|
||||
'DOMDocument::loadXML' => ['DOMDocument|bool', 'source'=>'non-empty-string', 'options='=>'int'],
|
||||
'DOMDocument::normalizeDocument' => ['void'],
|
||||
'DOMDocument::registerNodeClass' => ['bool', 'baseClass'=>'string', 'extendedClass'=>'?string'],
|
||||
|
@ -471,13 +471,13 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
||||
public function importNode(DOMNode $node, bool $deep = false) {}
|
||||
|
||||
/**
|
||||
* @return DOMDocument|false
|
||||
* @return bool
|
||||
* @psalm-ignore-falsable-return
|
||||
**/
|
||||
public function load(string $filename, int $options = 0) {}
|
||||
|
||||
/**
|
||||
* @return DOMDocument|false
|
||||
* @return bool
|
||||
* @psalm-ignore-falsable-return
|
||||
*/
|
||||
public function loadXML(string $source, int $options = 0) {}
|
||||
@ -492,10 +492,10 @@ class DOMDocument extends DOMNode implements DOMParentNode
|
||||
*/
|
||||
public function save(string $filename, int $options = 0) {}
|
||||
|
||||
/** @return DOMDocument|bool */
|
||||
/** @return bool */
|
||||
public function loadHTML(string $source, int $options = 0) {}
|
||||
|
||||
/** @return DOMDocument|bool */
|
||||
/** @return bool */
|
||||
public function loadHTMLFile(string $filename, int $options = 0) {}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user