Skip to content

Commit

Permalink
SimpleXMLElement::addAttribute() is a void function
Browse files Browse the repository at this point in the history
Closes GH-7033.
  • Loading branch information
cmb69 committed May 22, 2021
1 parent dcdac65 commit 24d9527
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext/simplexml/simplexml.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public function __construct(string $data, int $options = 0, bool $dataIsURL = fa
/** @return SimpleXMLElement|null */
public function addChild(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}

/** @return SimpleXMLElement|null */
public function addAttribute(string $qualifiedName, ?string $value = null, ?string $namespace = null) {}
/** @return void */
public function addAttribute(string $qualifiedName, string $value, ?string $namespace = null) {}

/** @return string */
public function getName() {}
Expand Down
8 changes: 6 additions & 2 deletions 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: 9d5e78ef2ea4e8bda025f9a9e7f0e07d2e9db702 */
* Stub hash: 03981bac1d9aef20ccf0adf36f75496c3da8e605 */

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 Expand Up @@ -67,7 +67,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_addChild, 0, 0, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()

#define arginfo_class_SimpleXMLElement_addAttribute arginfo_class_SimpleXMLElement_addChild
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_addAttribute, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement_getName, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand Down

0 comments on commit 24d9527

Please sign in to comment.