summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDik Takken <d.h.j.takken@freedom.nl>2020-10-01 20:55:36 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-10-06 09:47:13 +0200
commita7856c1bae688c5c0c9e7c211f7112b0bbf459dc (patch)
tree016f91f1da58ded5faeab5c67c4148eeae3c616b
parent3eae7aa77ef9999d401baef005ffd1d8e987d737 (diff)
downloadphp-git-a7856c1bae688c5c0c9e7c211f7112b0bbf459dc.tar.gz
Review parameter names in ext/xmlreader
Closes GH-6255.
-rw-r--r--ext/xmlreader/php_xmlreader.stub.php12
-rw-r--r--ext/xmlreader/php_xmlreader_arginfo.h14
-rw-r--r--ext/xmlreader/tests/002.phpt2
-rw-r--r--ext/xmlreader/tests/015-get-errors.phpt2
-rw-r--r--ext/xmlreader/tests/015-move-errors.phpt2
5 files changed, 16 insertions, 16 deletions
diff --git a/ext/xmlreader/php_xmlreader.stub.php b/ext/xmlreader/php_xmlreader.stub.php
index 5e8fda564d..6fe77a19fc 100644
--- a/ext/xmlreader/php_xmlreader.stub.php
+++ b/ext/xmlreader/php_xmlreader.stub.php
@@ -14,7 +14,7 @@ class XMLReader
public function getAttributeNo(int $index) {}
/** @return string|null */
- public function getAttributeNs(string $name, string $namespaceURI) {}
+ public function getAttributeNs(string $name, string $uri) {}
/** @return bool */
public function getParserProperty(int $property) {}
@@ -32,7 +32,7 @@ class XMLReader
public function moveToAttributeNo(int $index) {}
/** @return bool */
- public function moveToAttributeNs(string $name, string $namespaceURI) {}
+ public function moveToAttributeNs(string $name, string $uri) {}
/** @return bool */
public function moveToElement() {}
@@ -47,10 +47,10 @@ class XMLReader
public function read() {}
/** @return bool */
- public function next(?string $localname = null) {}
+ public function next(?string $name = null) {}
/** @return bool|XMLReader */
- public static function open(string $URI, ?string $encoding = null, int $options = 0) {}
+ public static function open(string $uri, ?string $encoding = null, int $flags = 0) {}
/** @return string */
public function readInnerXml() {}
@@ -74,8 +74,8 @@ class XMLReader
public function setRelaxNGSchemaSource(?string $source) {}
/** @return bool|XMLReader */
- public static function XML(string $source, ?string $encoding = null, int $options = 0) {}
+ public static function XML(string $source, ?string $encoding = null, int $flags = 0) {}
/** @return DOMNode|false */
- public function expand(?DOMNode $basenode = null) {}
+ public function expand(?DOMNode $baseNode = null) {}
}
diff --git a/ext/xmlreader/php_xmlreader_arginfo.h b/ext/xmlreader/php_xmlreader_arginfo.h
index 29ee6bb013..d9f9e4cf0a 100644
--- a/ext/xmlreader/php_xmlreader_arginfo.h
+++ b/ext/xmlreader/php_xmlreader_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 7d549429c217e5c3b9c36013b6737f4e8eeccbb6 */
+ * Stub hash: b5860285a7554c75780be7989bcbdeced6b557c8 */
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_close, 0, 0, 0)
ZEND_END_ARG_INFO()
@@ -14,7 +14,7 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNs, 0, 0, 2)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
- ZEND_ARG_TYPE_INFO(0, namespaceURI, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getParserProperty, 0, 0, 1)
@@ -42,13 +42,13 @@ ZEND_END_ARG_INFO()
#define arginfo_class_XMLReader_read arginfo_class_XMLReader_close
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_next, 0, 0, 0)
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, localname, IS_STRING, 1, "null")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_open, 0, 0, 1)
- ZEND_ARG_TYPE_INFO(0, URI, IS_STRING, 0)
+ ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
#define arginfo_class_XMLReader_readInnerXml arginfo_class_XMLReader_close
@@ -75,11 +75,11 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_XML, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null")
- ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_expand, 0, 0, 0)
- ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, basenode, DOMNode, 1, "null")
+ ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, baseNode, DOMNode, 1, "null")
ZEND_END_ARG_INFO()
diff --git a/ext/xmlreader/tests/002.phpt b/ext/xmlreader/tests/002.phpt
index 803c8c7243..eccdf7ae80 100644
--- a/ext/xmlreader/tests/002.phpt
+++ b/ext/xmlreader/tests/002.phpt
@@ -36,6 +36,6 @@ unlink($filename);
?>
--EXPECT--
-XMLReader::open(): Argument #1 ($URI) cannot be empty
+XMLReader::open(): Argument #1 ($uri) cannot be empty
books
books
diff --git a/ext/xmlreader/tests/015-get-errors.phpt b/ext/xmlreader/tests/015-get-errors.phpt
index 850d042a4b..98f4386b7c 100644
--- a/ext/xmlreader/tests/015-get-errors.phpt
+++ b/ext/xmlreader/tests/015-get-errors.phpt
@@ -46,5 +46,5 @@ $reader->close();
unlink(__DIR__.'/015-get-errors.xml');
?>
--EXPECT--
-XMLReader::getAttributeNs(): Argument #2 ($namespaceURI) cannot be empty
+XMLReader::getAttributeNs(): Argument #2 ($uri) cannot be empty
ns1:num: 1
diff --git a/ext/xmlreader/tests/015-move-errors.phpt b/ext/xmlreader/tests/015-move-errors.phpt
index 2b5580d7ea..13020be770 100644
--- a/ext/xmlreader/tests/015-move-errors.phpt
+++ b/ext/xmlreader/tests/015-move-errors.phpt
@@ -41,4 +41,4 @@ $reader->close();
unlink(__DIR__.'/015-move-errors.xml');
?>
--EXPECT--
-XMLReader::moveToAttributeNs(): Argument #2 ($namespaceURI) cannot be empty
+XMLReader::moveToAttributeNs(): Argument #2 ($uri) cannot be empty