Skip to content

Commit

Permalink
Fix some nullable return types in ext/simplexml
Browse files Browse the repository at this point in the history
Closes GH-7004
  • Loading branch information
kocsismate committed May 18, 2021
1 parent 6c3896b commit eedc988
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ext/simplexml/simplexml.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -31,18 +31,18 @@ public function getNamespaces(bool $recursive = false) {}
/** @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 */
Expand Down
2 changes: 1 addition & 1 deletion ext/simplexml/simplexml_arginfo.h
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit eedc988

Please sign in to comment.