From d6c0c5ef8e90b26b8cf1632be1baa379405d0ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Hansl=C3=ADk?= Date: Thu, 9 May 2019 21:58:46 +0200 Subject: [PATCH] Fixed some arg infos to match documentation --- ext/spl/spl_array.c | 6 +++--- ext/spl/spl_dllist.c | 4 ++-- ext/spl/spl_fixedarray.c | 4 ++-- ext/spl/spl_heap.c | 10 +++++----- ext/spl/spl_observer.c | 8 ++++---- ext/spl/tests/bug71412.phpt | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 284bb71c81d..0181c84f276 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1290,7 +1290,7 @@ SPL_METHOD(Array, setFlags) } /* }}} */ -/* {{{ proto Array|Object ArrayObject::exchangeArray(Array|Object ar = array()) +/* {{{ proto Array|Object ArrayObject::exchangeArray(Array|Object input = array()) Replace the referenced array or object with a new one and return the old one (right now copy - to be changed) */ SPL_METHOD(Array, exchangeArray) { @@ -1897,7 +1897,7 @@ ZEND_END_ARG_INFO() /* ArrayIterator::__construct and ArrayObject::__construct have different signatures */ ZEND_BEGIN_ARG_INFO_EX(arginfo_array_iterator___construct, 0, 0, 0) ZEND_ARG_INFO(0, array) - ZEND_ARG_INFO(0, ar_flags) + ZEND_ARG_INFO(0, flags) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_array_offsetGet, 0, 0, 1) @@ -1918,7 +1918,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_array_seek, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_array_exchangeArray, 0) - ZEND_ARG_INFO(0, array) + ZEND_ARG_INFO(0, input) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_array_setFlags, 0) diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 299cf70174e..19be408d813 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -709,7 +709,7 @@ SPL_METHOD(SplDoublyLinkedList, isEmpty) } /* }}} */ -/* {{{ proto int SplDoublyLinkedList::setIteratorMode(int flags) +/* {{{ proto int SplDoublyLinkedList::setIteratorMode(int mode) Set the mode of iteration */ SPL_METHOD(SplDoublyLinkedList, setIteratorMode) { @@ -1376,7 +1376,7 @@ zend_object_iterator *spl_dllist_get_iterator(zend_class_entry *ce, zval *object /* Function/Class/Method definitions */ ZEND_BEGIN_ARG_INFO(arginfo_dllist_setiteratormode, 0) - ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, mode) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_dllist_push, 0) diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 071826dad08..5e4a85bf12a 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -647,7 +647,7 @@ SPL_METHOD(SplFixedArray, toArray) } /* }}} */ -/* {{{ proto object SplFixedArray::fromArray(array data[, bool save_indexes]) +/* {{{ proto object SplFixedArray::fromArray(array array[, bool save_indexes]) */ SPL_METHOD(SplFixedArray, fromArray) { @@ -1035,7 +1035,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_fixedarray_setSize, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_fixedarray_fromArray, 0, 0, 1) - ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, array) ZEND_ARG_INFO(0, save_indexes) ZEND_END_ARG_INFO() diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index aad9ed4f360..637a9787477 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -811,7 +811,7 @@ SPL_METHOD(SplHeap, isCorrupted) } /* }}} */ -/* {{{ proto bool SplPriorityQueue::compare(mixed $a, mixed $b) +/* {{{ proto bool SplPriorityQueue::compare(mixed $value1, mixed $value2) compare the priorities */ SPL_METHOD(SplPriorityQueue, compare) { @@ -854,7 +854,7 @@ SPL_METHOD(SplHeap, top) } /* }}} */ -/* {{{ proto bool SplMinHeap::compare(mixed $a, mixed $b) +/* {{{ proto bool SplMinHeap::compare(mixed $value1, mixed $value2) compare the values */ SPL_METHOD(SplMinHeap, compare) { @@ -868,7 +868,7 @@ SPL_METHOD(SplMinHeap, compare) } /* }}} */ -/* {{{ proto bool SplMaxHeap::compare(mixed $a, mixed $b) +/* {{{ proto bool SplMaxHeap::compare(mixed $value1, mixed $value2) compare the values */ SPL_METHOD(SplMaxHeap, compare) { @@ -1135,8 +1135,8 @@ ZEND_BEGIN_ARG_INFO(arginfo_heap_insert, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_heap_compare, 0) - ZEND_ARG_INFO(0, a) - ZEND_ARG_INFO(0, b) + ZEND_ARG_INFO(0, value1) + ZEND_ARG_INFO(0, value2) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_pqueue_insert, 0) diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index 38101951936..b3879c5ec3f 100644 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -44,7 +44,7 @@ SPL_METHOD(SplSubject, detach); SPL_METHOD(SplSubject, notify); ZEND_BEGIN_ARG_INFO(arginfo_SplObserver_update, 0) - ZEND_ARG_OBJ_INFO(0, SplSubject, SplSubject, 0) + ZEND_ARG_OBJ_INFO(0, subject, SplSubject, 0) ZEND_END_ARG_INFO(); static const zend_function_entry spl_funcs_SplObserver[] = { @@ -53,7 +53,7 @@ static const zend_function_entry spl_funcs_SplObserver[] = { }; ZEND_BEGIN_ARG_INFO(arginfo_SplSubject_attach, 0) - ZEND_ARG_OBJ_INFO(0, SplObserver, SplObserver, 0) + ZEND_ARG_OBJ_INFO(0, observer, SplObserver, 0) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO(arginfo_SplSubject_void, 0) @@ -393,7 +393,7 @@ int spl_object_storage_contains(spl_SplObjectStorage *intern, zval *this, zval * return found; } /* }}} */ -/* {{{ proto void SplObjectStorage::attach(object obj, mixed inf = NULL) +/* {{{ proto void SplObjectStorage::attach(object obj, mixed data = NULL) Attaches an object to the storage if not yet contained */ SPL_METHOD(SplObjectStorage, attach) { @@ -946,7 +946,7 @@ ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_attach, 0, 0, 1) ZEND_ARG_INFO(0, object) - ZEND_ARG_INFO(0, inf) + ZEND_ARG_INFO(0, data) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO(arginfo_Serialized, 0) diff --git a/ext/spl/tests/bug71412.phpt b/ext/spl/tests/bug71412.phpt index 7db6b084694..7857f27ace0 100644 --- a/ext/spl/tests/bug71412.phpt +++ b/ext/spl/tests/bug71412.phpt @@ -9,6 +9,6 @@ Method [ public method __construct ] { - Parameters [2] { Parameter #0 [ $array ] - Parameter #1 [ $ar_flags ] + Parameter #1 [ $flags ] } }