Skip to content

Commit 8eb0e76

Browse files
committed
Fix the return type of AppendIterator::getIteratorIndex()
1 parent 63541b8 commit 8eb0e76

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ext/spl/spl_iterators.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public function current(): mixed {}
304304
public function next(): void {}
305305

306306
/** @tentative-return-type */
307-
public function getIteratorIndex(): int {}
307+
public function getIteratorIndex(): ?int {}
308308

309309
/** @tentative-return-type */
310310
public function getArrayIterator(): ArrayIterator {}

ext/spl/spl_iterators_arginfo.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: d69310bd3c6a7f8a0df41c2285af88711b1032f2 */
2+
* Stub hash: 889a6eed2d62fbb6af168146840189d37765dbaa */
33

44
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_EmptyIterator_current, 0, 0, never, 0)
55
ZEND_END_ARG_INFO()
@@ -230,7 +230,8 @@ ZEND_END_ARG_INFO()
230230

231231
#define arginfo_class_AppendIterator_next arginfo_class_EmptyIterator_next
232232

233-
#define arginfo_class_AppendIterator_getIteratorIndex arginfo_class_RecursiveIteratorIterator_getDepth
233+
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_AppendIterator_getIteratorIndex, 0, 0, IS_LONG, 1)
234+
ZEND_END_ARG_INFO()
234235

235236
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_AppendIterator_getArrayIterator, 0, 0, ArrayIterator, 0)
236237
ZEND_END_ARG_INFO()

0 commit comments

Comments
 (0)