Fix some nullable return types in ext/simplexml

Closes GH-7004
This commit is contained in:
Máté Kocsis 2021-05-18 14:43:36 +02:00
parent 6c3896b1e9
commit eedc988a4e
No known key found for this signature in database
GPG key ID: FD055E41728BF310
2 changed files with 6 additions and 6 deletions

View file

@ -10,7 +10,7 @@ function simplexml_import_dom(SimpleXMLElement|DOMNode $node, ?string $class_nam
class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
{
/** @return array|false */
/** @return array|null|false */
public function xpath(string $expression) {}
/** @return bool */
@ -31,18 +31,18 @@ class SimpleXMLElement implements Stringable, Countable, RecursiveIterator
/** @return array|false */
public function getDocNamespaces(bool $recursive = false, bool $fromRoot = true) {}
/** @return SimpleXMLIterator */
/** @return SimpleXMLElement|null */
public function children(?string $namespaceOrPrefix = null, bool $isPrefix = false) {}
/** @return SimpleXMLIterator */
/** @return SimpleXMLElement|null */
public function attributes(?string $namespaceOrPrefix = null, bool $isPrefix = false) {}
public function __construct(string $data, int $options = 0, bool $dataIsURL = false, string $namespaceOrPrefix = "", bool $isPrefix = false) {}
/** @return SimpleXMLElement */
/** @return SimpleXMLElement|null */
public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}
/** @return SimpleXMLElement */
/** @return SimpleXMLElement|null */
public function addAttribute(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}
/** @return string */

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 70ace711365bb5e7df3174d4cfe68fb3df34a105 */
* Stub hash: 9d5e78ef2ea4e8bda025f9a9e7f0e07d2e9db702 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_file, 0, 1, SimpleXMLElement, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)