diff --git a/ext/phalcon/annotations/collection.zep.c b/ext/phalcon/annotations/collection.zep.c index 5af010f64e..0415c14916 100644 --- a/ext/phalcon/annotations/collection.zep.c +++ b/ext/phalcon/annotations/collection.zep.c @@ -172,8 +172,6 @@ PHP_METHOD(Phalcon_Annotations_Collection, rewind) /** * Returns the current annotation in the iterator - * - * @return \Phalcon\Annotations\Annotation */ PHP_METHOD(Phalcon_Annotations_Collection, current) { @@ -283,7 +281,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, get) ZEPHIR_OBS_VAR(&annotations); zephir_read_property(&annotations, this_ptr, ZEND_STRL("_annotations"), PH_NOISY_CC); if (Z_TYPE_P(&annotations) == IS_ARRAY) { - zephir_is_iterable(&annotations, 0, "phalcon/annotations/collection.zep", 147); + zephir_is_iterable(&annotations, 0, "phalcon/annotations/collection.zep", 145); if (Z_TYPE_P(&annotations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&annotations), _0$$3) { @@ -323,7 +321,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, get) ZEPHIR_CONCAT_SVS(&_5, "Collection doesn't have an annotation called '", &name, "'"); ZEPHIR_CALL_METHOD(NULL, &_4, "__construct", NULL, 4, &_5); zephir_check_call_status(); - zephir_throw_exception_debug(&_4, "phalcon/annotations/collection.zep", 149); + zephir_throw_exception_debug(&_4, "phalcon/annotations/collection.zep", 147); ZEPHIR_MM_RESTORE(); return; } @@ -364,7 +362,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, getAll) ZEPHIR_OBS_VAR(&annotations); zephir_read_property(&annotations, this_ptr, ZEND_STRL("_annotations"), PH_NOISY_CC); if (Z_TYPE_P(&annotations) == IS_ARRAY) { - zephir_is_iterable(&annotations, 0, "phalcon/annotations/collection.zep", 167); + zephir_is_iterable(&annotations, 0, "phalcon/annotations/collection.zep", 165); if (Z_TYPE_P(&annotations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&annotations), _0$$3) { @@ -373,7 +371,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, getAll) ZEPHIR_CALL_METHOD(&_2$$4, &annotation, "getname", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&name, &_2$$4)) { - zephir_array_append(&found, &annotation, PH_SEPARATE, "phalcon/annotations/collection.zep", 164); + zephir_array_append(&found, &annotation, PH_SEPARATE, "phalcon/annotations/collection.zep", 162); } } ZEND_HASH_FOREACH_END(); } else { @@ -390,7 +388,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, getAll) ZEPHIR_CALL_METHOD(&_3$$6, &annotation, "getname", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&name, &_3$$6)) { - zephir_array_append(&found, &annotation, PH_SEPARATE, "phalcon/annotations/collection.zep", 164); + zephir_array_append(&found, &annotation, PH_SEPARATE, "phalcon/annotations/collection.zep", 162); } ZEPHIR_CALL_METHOD(NULL, &annotations, "next", NULL, 0); zephir_check_call_status(); @@ -434,7 +432,7 @@ PHP_METHOD(Phalcon_Annotations_Collection, has) ZEPHIR_OBS_VAR(&annotations); zephir_read_property(&annotations, this_ptr, ZEND_STRL("_annotations"), PH_NOISY_CC); if (Z_TYPE_P(&annotations) == IS_ARRAY) { - zephir_is_iterable(&annotations, 0, "phalcon/annotations/collection.zep", 186); + zephir_is_iterable(&annotations, 0, "phalcon/annotations/collection.zep", 184); if (Z_TYPE_P(&annotations) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&annotations), _0$$3) { diff --git a/ext/phalcon/annotations/collection.zep.h b/ext/phalcon/annotations/collection.zep.h index 33fe3a843b..dce902d7ca 100644 --- a/ext/phalcon/annotations/collection.zep.h +++ b/ext/phalcon/annotations/collection.zep.h @@ -25,7 +25,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_annotations_collection_rewind, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_annotations_collection_current, 0, 0, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_annotations_collection_current, 0, 0, 0) +#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_annotations_collection_key, 0, 0, IS_LONG, 0) @@ -56,11 +60,7 @@ ZEPHIR_INIT_FUNCS(phalcon_annotations_collection_method_entry) { PHP_ME(Phalcon_Annotations_Collection, __construct, arginfo_phalcon_annotations_collection___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) PHP_ME(Phalcon_Annotations_Collection, count, arginfo_phalcon_annotations_collection_count, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Annotations_Collection, rewind, arginfo_phalcon_annotations_collection_rewind, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 PHP_ME(Phalcon_Annotations_Collection, current, arginfo_phalcon_annotations_collection_current, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Annotations_Collection, current, NULL, ZEND_ACC_PUBLIC) -#endif PHP_ME(Phalcon_Annotations_Collection, key, arginfo_phalcon_annotations_collection_key, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Annotations_Collection, next, arginfo_phalcon_annotations_collection_next, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Annotations_Collection, valid, arginfo_phalcon_annotations_collection_valid, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/assets/collection.zep.h b/ext/phalcon/assets/collection.zep.h index 5725e28546..bc386c98de 100644 --- a/ext/phalcon/assets/collection.zep.h +++ b/ext/phalcon/assets/collection.zep.h @@ -129,7 +129,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_assets_collection_current, 0, 0, Phalcon\\Assets\\Resource, 0) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_assets_collection_key, 0, 0, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_assets_collection_key, 0, 0, 0) +#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_assets_collection_next, 0, 0, IS_VOID, 0) @@ -265,11 +269,7 @@ ZEPHIR_INIT_FUNCS(phalcon_assets_collection_method_entry) { PHP_ME(Phalcon_Assets_Collection, count, arginfo_phalcon_assets_collection_count, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Collection, rewind, arginfo_phalcon_assets_collection_rewind, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Collection, current, arginfo_phalcon_assets_collection_current, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 PHP_ME(Phalcon_Assets_Collection, key, arginfo_phalcon_assets_collection_key, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Assets_Collection, key, NULL, ZEND_ACC_PUBLIC) -#endif PHP_ME(Phalcon_Assets_Collection, next, arginfo_phalcon_assets_collection_next, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Collection, valid, arginfo_phalcon_assets_collection_valid, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Assets_Collection, setTargetPath, arginfo_phalcon_assets_collection_settargetpath, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/di.zep.c b/ext/phalcon/di.zep.c index c4b20450e9..22a437618c 100644 --- a/ext/phalcon/di.zep.c +++ b/ext/phalcon/di.zep.c @@ -763,7 +763,8 @@ PHP_METHOD(Phalcon_Di, offsetExists) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *name, name_sub; + zval name_sub; + zval *name; zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); @@ -795,7 +796,8 @@ PHP_METHOD(Phalcon_Di, offsetSet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *name, name_sub, *definition, definition_sub; + zval name_sub, definition_sub; + zval *name, *definition; zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); @@ -815,7 +817,7 @@ PHP_METHOD(Phalcon_Di, offsetSet) ZEPHIR_CALL_METHOD(NULL, this_ptr, "setshared", NULL, 0, name, definition); zephir_check_call_status(); - RETURN_MM_BOOL(1); + ZEPHIR_MM_RESTORE(); } /** @@ -829,7 +831,8 @@ PHP_METHOD(Phalcon_Di, offsetGet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *name, name_sub; + zval name_sub; + zval *name; zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); @@ -855,7 +858,10 @@ PHP_METHOD(Phalcon_Di, offsetGet) */ PHP_METHOD(Phalcon_Di, offsetUnset) { - zval *name, name_sub; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zend_long ZEPHIR_LAST_CALL_STATUS; + zval name_sub; + zval *name; zval *this_ptr = getThis(); ZVAL_UNDEF(&name_sub); @@ -867,10 +873,13 @@ PHP_METHOD(Phalcon_Di, offsetUnset) #endif - zephir_fetch_params_without_memory_grow(1, 0, &name); + ZEPHIR_MM_GROW(); + zephir_fetch_params(1, 1, 0, &name); - RETURN_BOOL(0); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "remove", NULL, 0, name); + zephir_check_call_status(); + ZEPHIR_MM_RESTORE(); } /** @@ -963,7 +972,7 @@ PHP_METHOD(Phalcon_Di, __call) ZEPHIR_CONCAT_SVS(&_6, "Call to undefined method or service '", &method, "'"); ZEPHIR_CALL_METHOD(NULL, &_5, "__construct", NULL, 4, &_6); zephir_check_call_status(); - zephir_throw_exception_debug(&_5, "phalcon/di.zep", 406); + zephir_throw_exception_debug(&_5, "phalcon/di.zep", 405); ZEPHIR_MM_RESTORE(); return; } @@ -1256,7 +1265,7 @@ PHP_METHOD(Phalcon_Di, loadFromConfig) ZEPHIR_CALL_METHOD(&services, config, "toarray", NULL, 0); zephir_check_call_status(); - zephir_is_iterable(&services, 0, "phalcon/di.zep", 551); + zephir_is_iterable(&services, 0, "phalcon/di.zep", 550); if (Z_TYPE_P(&services) == IS_ARRAY) { ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(&services), _2, _3, _0) { @@ -1271,7 +1280,7 @@ PHP_METHOD(Phalcon_Di, loadFromConfig) _4$$3 = zephir_array_isset_string(&service, SL("shared")); if (_4$$3) { ZEPHIR_OBS_NVAR(&_5$$3); - zephir_array_fetch_string(&_5$$3, &service, SL("shared"), PH_NOISY, "phalcon/di.zep", 549); + zephir_array_fetch_string(&_5$$3, &service, SL("shared"), PH_NOISY, "phalcon/di.zep", 548); _4$$3 = zephir_is_true(&_5$$3); } ZVAL_BOOL(&_6$$3, _4$$3); @@ -1294,7 +1303,7 @@ PHP_METHOD(Phalcon_Di, loadFromConfig) _8$$4 = zephir_array_isset_string(&service, SL("shared")); if (_8$$4) { ZEPHIR_OBS_NVAR(&_9$$4); - zephir_array_fetch_string(&_9$$4, &service, SL("shared"), PH_NOISY, "phalcon/di.zep", 549); + zephir_array_fetch_string(&_9$$4, &service, SL("shared"), PH_NOISY, "phalcon/di.zep", 548); _8$$4 = zephir_is_true(&_9$$4); } ZVAL_BOOL(&_10$$4, _8$$4); diff --git a/ext/phalcon/di.zep.h b/ext/phalcon/di.zep.h index 4a025d8c89..8987201340 100644 --- a/ext/phalcon/di.zep.h +++ b/ext/phalcon/di.zep.h @@ -99,16 +99,22 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_offsetexists, 0, 1, _ ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_offsetset, 0, 2, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_offsetset, 0, 2, IS_VOID, 0) + ZEND_ARG_INFO(0, name) ZEND_ARG_INFO(0, definition) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_di_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_offsetunset, 0, 1, _IS_BOOL, 0) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_di_offsetunset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/forms/form.zep.h b/ext/phalcon/forms/form.zep.h index 9345d0d992..10f8a0eee0 100644 --- a/ext/phalcon/forms/form.zep.h +++ b/ext/phalcon/forms/form.zep.h @@ -156,7 +156,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_rewind, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_current, 0, 0, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_forms_form_current, 0, 0, 0) +#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_forms_form_key, 0, 0, IS_LONG, 0) @@ -208,11 +212,7 @@ ZEPHIR_INIT_FUNCS(phalcon_forms_form_method_entry) { PHP_ME(Phalcon_Forms_Form, clear, arginfo_phalcon_forms_form_clear, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, count, arginfo_phalcon_forms_form_count, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, rewind, arginfo_phalcon_forms_form_rewind, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 PHP_ME(Phalcon_Forms_Form, current, arginfo_phalcon_forms_form_current, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Forms_Form, current, NULL, ZEND_ACC_PUBLIC) -#endif PHP_ME(Phalcon_Forms_Form, key, arginfo_phalcon_forms_form_key, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, next, arginfo_phalcon_forms_form_next, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Forms_Form, valid, arginfo_phalcon_forms_form_valid, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/collection/document.zep.c b/ext/phalcon/mvc/collection/document.zep.c index 086cd4e76c..13c9af978b 100644 --- a/ext/phalcon/mvc/collection/document.zep.c +++ b/ext/phalcon/mvc/collection/document.zep.c @@ -44,7 +44,8 @@ ZEPHIR_INIT_CLASS(Phalcon_Mvc_Collection_Document) */ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetExists) { - zval *index, index_sub; + zval index_sub; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -98,7 +99,8 @@ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetGet) */ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetSet) { - zval *index, index_sub, *value, value_sub; + zval index_sub, value_sub; + zval *index, *value; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -125,7 +127,8 @@ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetSet) */ PHP_METHOD(Phalcon_Mvc_Collection_Document, offsetUnset) { - zval *offset, offset_sub; + zval offset_sub; + zval *offset; zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); diff --git a/ext/phalcon/mvc/collection/document.zep.h b/ext/phalcon/mvc/collection/document.zep.h index e3cb38779c..36a0b70896 100644 --- a/ext/phalcon/mvc/collection/document.zep.h +++ b/ext/phalcon/mvc/collection/document.zep.h @@ -15,7 +15,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_collection_document_ ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_collection_document_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_collection_document_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() @@ -25,7 +29,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_collection_document_ ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_collection_document_offsetunset, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_collection_document_offsetunset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/mvc/micro.zep.c b/ext/phalcon/mvc/micro.zep.c index fc35704255..b781171d86 100644 --- a/ext/phalcon/mvc/micro.zep.c +++ b/ext/phalcon/mvc/micro.zep.c @@ -1890,15 +1890,13 @@ PHP_METHOD(Phalcon_Mvc_Micro, getReturnedValue) /** * Check if a service is registered in the internal services container using the array syntax - * - * @param string alias - * @return boolean */ PHP_METHOD(Phalcon_Mvc_Micro, offsetExists) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *alias, alias_sub; + zval alias_sub; + zval *alias; zval *this_ptr = getThis(); ZVAL_UNDEF(&alias_sub); @@ -1925,15 +1923,13 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetExists) * * $app["request"] = new \Phalcon\Http\Request(); * - * - * @param string alias - * @param mixed definition */ PHP_METHOD(Phalcon_Mvc_Micro, offsetSet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *alias, alias_sub, *definition, definition_sub; + zval alias_sub, definition_sub; + zval *alias, *definition; zval *this_ptr = getThis(); ZVAL_UNDEF(&alias_sub); @@ -1964,15 +1960,13 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetSet) * $app["request"] * ); * - * - * @param string alias - * @return mixed */ PHP_METHOD(Phalcon_Mvc_Micro, offsetGet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *alias, alias_sub; + zval alias_sub; + zval *alias; zval *this_ptr = getThis(); ZVAL_UNDEF(&alias_sub); @@ -2000,7 +1994,8 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetGet) */ PHP_METHOD(Phalcon_Mvc_Micro, offsetUnset) { - zval *alias, alias_sub; + zval alias_sub; + zval *alias; zval *this_ptr = getThis(); ZVAL_UNDEF(&alias_sub); @@ -2015,8 +2010,6 @@ PHP_METHOD(Phalcon_Mvc_Micro, offsetUnset) zephir_fetch_params_without_memory_grow(1, 0, &alias); - RETVAL_ZVAL(alias, 1, 0); - return; } /** diff --git a/ext/phalcon/mvc/micro.zep.h b/ext/phalcon/mvc/micro.zep.h index acdcbcbb7d..ceed4709eb 100644 --- a/ext/phalcon/mvc/micro.zep.h +++ b/ext/phalcon/mvc/micro.zep.h @@ -142,16 +142,22 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_offsetexists, ZEND_ARG_INFO(0, alias) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_micro_offsetset, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_offsetset, 0, 2, IS_VOID, 0) + ZEND_ARG_INFO(0, alias) ZEND_ARG_INFO(0, definition) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_micro_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, alias) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_micro_offsetunset, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_micro_offsetunset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, alias) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/mvc/model/resultset.zep.c b/ext/phalcon/mvc/model/resultset.zep.c index bfd2fd0d00..da0548812b 100644 --- a/ext/phalcon/mvc/model/resultset.zep.c +++ b/ext/phalcon/mvc/model/resultset.zep.c @@ -376,7 +376,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, count) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetExists) { - zval *index, index_sub, _0; + zval index_sub, _0; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -403,7 +404,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetGet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *index, index_sub, _0; + zval index_sub, _0; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -440,7 +442,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetGet) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetSet) { - zval *index, index_sub, *value, value_sub; + zval index_sub, value_sub; + zval *index, *value; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -466,7 +469,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetSet) */ PHP_METHOD(Phalcon_Mvc_Model_Resultset, offsetUnset) { - zval *offset, offset_sub; + zval offset_sub; + zval *offset; zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); diff --git a/ext/phalcon/mvc/model/resultset.zep.h b/ext/phalcon/mvc/model/resultset.zep.h index 6a8368c004..def93e1ff5 100644 --- a/ext/phalcon/mvc/model/resultset.zep.h +++ b/ext/phalcon/mvc/model/resultset.zep.h @@ -57,16 +57,22 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_offs ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetset, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetset, 0, 2, IS_VOID, 0) + ZEND_ARG_INFO(0, index) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetunset, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_offsetunset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/mvc/model/resultset/complex.zep.h b/ext/phalcon/mvc/model/resultset/complex.zep.h index 19cfa29146..32606d7eef 100644 --- a/ext/phalcon/mvc/model/resultset/complex.zep.h +++ b/ext/phalcon/mvc/model/resultset/complex.zep.h @@ -15,7 +15,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex___construct, ZEND_ARG_OBJ_INFO(0, cache, Phalcon\\Cache\\BackendInterface, 1) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex_current, 0, 0, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex_current, 0, 0, 0) +#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_complex_toarray, 0, 0, IS_ARRAY, 0) @@ -31,11 +35,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_model_resultset_complex_method_entry) { PHP_ME(Phalcon_Mvc_Model_Resultset_Complex, __construct, arginfo_phalcon_mvc_model_resultset_complex___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Resultset_Complex, current, arginfo_phalcon_mvc_model_resultset_complex_current, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) -#else - PHP_ME(Phalcon_Mvc_Model_Resultset_Complex, current, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) -#endif + PHP_ME(Phalcon_Mvc_Model_Resultset_Complex, current, arginfo_phalcon_mvc_model_resultset_complex_current, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset_Complex, toArray, arginfo_phalcon_mvc_model_resultset_complex_toarray, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset_Complex, __serialize, arginfo_phalcon_mvc_model_resultset_complex___serialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset_Complex, __unserialize, arginfo_phalcon_mvc_model_resultset_complex___unserialize, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/resultset/simple.zep.h b/ext/phalcon/mvc/model/resultset/simple.zep.h index ff910d9359..194ac1d374 100644 --- a/ext/phalcon/mvc/model/resultset/simple.zep.h +++ b/ext/phalcon/mvc/model/resultset/simple.zep.h @@ -17,7 +17,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_simple___construct, 0 ZEND_ARG_INFO(0, keepSnapshots) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_simple_current, 0, 0, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_resultset_simple_current, 0, 0, 0) +#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_resultset_simple_toarray, 0, 0, IS_ARRAY, 0) @@ -34,11 +38,7 @@ ZEND_END_ARG_INFO() ZEPHIR_INIT_FUNCS(phalcon_mvc_model_resultset_simple_method_entry) { PHP_ME(Phalcon_Mvc_Model_Resultset_Simple, __construct, arginfo_phalcon_mvc_model_resultset_simple___construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) -#if PHP_VERSION_ID >= 80000 - PHP_ME(Phalcon_Mvc_Model_Resultset_Simple, current, arginfo_phalcon_mvc_model_resultset_simple_current, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) -#else - PHP_ME(Phalcon_Mvc_Model_Resultset_Simple, current, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) -#endif + PHP_ME(Phalcon_Mvc_Model_Resultset_Simple, current, arginfo_phalcon_mvc_model_resultset_simple_current, ZEND_ACC_FINAL|ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset_Simple, toArray, arginfo_phalcon_mvc_model_resultset_simple_toarray, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset_Simple, __serialize, arginfo_phalcon_mvc_model_resultset_simple___serialize, ZEND_ACC_PUBLIC) PHP_ME(Phalcon_Mvc_Model_Resultset_Simple, __unserialize, arginfo_phalcon_mvc_model_resultset_simple___unserialize, ZEND_ACC_PUBLIC) diff --git a/ext/phalcon/mvc/model/row.zep.c b/ext/phalcon/mvc/model/row.zep.c index 282bfd446d..c20602e855 100644 --- a/ext/phalcon/mvc/model/row.zep.c +++ b/ext/phalcon/mvc/model/row.zep.c @@ -66,13 +66,11 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, setDirtyState) /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * Checks whether offset exists in the row - * - * @param string|int $index - * @return boolean */ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetExists) { - zval *index, index_sub; + zval index_sub; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -92,15 +90,13 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetExists) /** * Gets a record in a specific position of the row - * - * @param string|int index - * @return string|Phalcon\Mvc\ModelInterface */ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetGet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *index, index_sub, _0, _1; + zval index_sub, _0, _1; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -121,7 +117,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetGet) ZEPHIR_CALL_METHOD(&_0, this_ptr, "offsetexists", NULL, 0, index); zephir_check_call_status(); if (!(zephir_is_true(&_0))) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The index does not exist in the row", "phalcon/mvc/model/row.zep", 67); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_mvc_model_exception_ce, "The index does not exist in the row", "phalcon/mvc/model/row.zep", 61); return; } ZEPHIR_OBS_VAR(&_1); @@ -131,9 +127,6 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetGet) /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface - * - * @param string|int index - * @param \Phalcon\Mvc\ModelInterface value */ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetSet) { @@ -155,14 +148,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetSet) zephir_fetch_params_without_memory_grow(2, 0, &element, &value); - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Row is an immutable ArrayAccess object", "phalcon/mvc/model/row.zep", 81); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Row is an immutable ArrayAccess object", "phalcon/mvc/model/row.zep", 72); return; } /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface - * - * @param string|int offset */ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetUnset) { @@ -182,7 +173,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Row, offsetUnset) zephir_fetch_params_without_memory_grow(1, 0, &element); - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Row is an immutable ArrayAccess object", "phalcon/mvc/model/row.zep", 91); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_mvc_model_exception_ce, "Row is an immutable ArrayAccess object", "phalcon/mvc/model/row.zep", 80); return; } diff --git a/ext/phalcon/mvc/model/row.zep.h b/ext/phalcon/mvc/model/row.zep.h index 93506a8b1d..0de3f3f7bd 100644 --- a/ext/phalcon/mvc/model/row.zep.h +++ b/ext/phalcon/mvc/model/row.zep.h @@ -21,7 +21,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_row_offsetexis ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_mvc_model_row_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_row_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/registry.zep.h b/ext/phalcon/registry.zep.h index dff0b6baca..621aa14a5d 100644 --- a/ext/phalcon/registry.zep.h +++ b/ext/phalcon/registry.zep.h @@ -26,7 +26,11 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_registry_offsetexists, 0 ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_registry_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_registry_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() @@ -56,7 +60,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_registry_valid, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_registry_current, 0, 0, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_registry_current, 0, 0, 0) +#endif ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_registry___set, 0, 2, IS_VOID, 0) @@ -93,11 +101,7 @@ ZEPHIR_INIT_FUNCS(phalcon_registry_method_entry) { PHP_ME(Phalcon_Registry, key, arginfo_phalcon_registry_key, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) PHP_ME(Phalcon_Registry, rewind, arginfo_phalcon_registry_rewind, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) PHP_ME(Phalcon_Registry, valid, arginfo_phalcon_registry_valid, ZEND_ACC_PUBLIC) -#if PHP_VERSION_ID >= 80000 PHP_ME(Phalcon_Registry, current, arginfo_phalcon_registry_current, ZEND_ACC_PUBLIC) -#else - PHP_ME(Phalcon_Registry, current, NULL, ZEND_ACC_PUBLIC) -#endif PHP_ME(Phalcon_Registry, __set, arginfo_phalcon_registry___set, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) PHP_ME(Phalcon_Registry, __get, arginfo_phalcon_registry___get, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) PHP_ME(Phalcon_Registry, __isset, arginfo_phalcon_registry___isset, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) diff --git a/ext/phalcon/session/bag.zep.c b/ext/phalcon/session/bag.zep.c index 527f254368..c658792995 100644 --- a/ext/phalcon/session/bag.zep.c +++ b/ext/phalcon/session/bag.zep.c @@ -679,7 +679,8 @@ PHP_METHOD(Phalcon_Session_Bag, offsetSet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *property, property_sub, *value, value_sub; + zval property_sub, value_sub; + zval *property, *value; zval *this_ptr = getThis(); ZVAL_UNDEF(&property_sub); @@ -697,16 +698,17 @@ PHP_METHOD(Phalcon_Session_Bag, offsetSet) zephir_fetch_params(1, 2, 0, &property, &value); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "set", NULL, 0, property, value); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "set", NULL, 0, property, value); zephir_check_call_status(); - RETURN_MM(); + ZEPHIR_MM_RESTORE(); } PHP_METHOD(Phalcon_Session_Bag, offsetExists) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *property, property_sub; + zval property_sub; + zval *property; zval *this_ptr = getThis(); ZVAL_UNDEF(&property_sub); @@ -731,7 +733,8 @@ PHP_METHOD(Phalcon_Session_Bag, offsetUnset) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *property, property_sub; + zval property_sub; + zval *property; zval *this_ptr = getThis(); ZVAL_UNDEF(&property_sub); @@ -747,16 +750,17 @@ PHP_METHOD(Phalcon_Session_Bag, offsetUnset) zephir_fetch_params(1, 1, 0, &property); - ZEPHIR_RETURN_CALL_METHOD(this_ptr, "remove", NULL, 0, property); + ZEPHIR_CALL_METHOD(NULL, this_ptr, "remove", NULL, 0, property); zephir_check_call_status(); - RETURN_MM(); + ZEPHIR_MM_RESTORE(); } PHP_METHOD(Phalcon_Session_Bag, offsetGet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *property, property_sub; + zval property_sub; + zval *property; zval *this_ptr = getThis(); ZVAL_UNDEF(&property_sub); diff --git a/ext/phalcon/session/bag.zep.h b/ext/phalcon/session/bag.zep.h index 20d6865b9a..b3ec132380 100644 --- a/ext/phalcon/session/bag.zep.h +++ b/ext/phalcon/session/bag.zep.h @@ -82,7 +82,8 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_phalcon_session_bag_getiterator, 0, 0, ArrayIterator, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_bag_offsetset, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_bag_offsetset, 0, 2, IS_VOID, 0) + ZEND_ARG_INFO(0, property) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() @@ -91,11 +92,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_bag_offsetexists ZEND_ARG_INFO(0, property) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_bag_offsetunset, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_bag_offsetunset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, property) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_session_bag_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_session_bag_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, property) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/translate/adapter.zep.c b/ext/phalcon/translate/adapter.zep.c index 516c7e87e0..17488ccd01 100644 --- a/ext/phalcon/translate/adapter.zep.c +++ b/ext/phalcon/translate/adapter.zep.c @@ -199,13 +199,11 @@ PHP_METHOD(Phalcon_Translate_Adapter, _) /** * Sets a translation value - * - * @param string offset - * @param string value */ PHP_METHOD(Phalcon_Translate_Adapter, offsetSet) { - zval *offset, offset_sub, *value, value_sub; + zval offset_sub, value_sub; + zval *offset, *value; zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); @@ -222,7 +220,7 @@ PHP_METHOD(Phalcon_Translate_Adapter, offsetSet) zephir_fetch_params_without_memory_grow(2, 0, &offset, &value); - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_translate_exception_ce, "Translate is an immutable ArrayAccess object", "phalcon/translate/adapter.zep", 86); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_translate_exception_ce, "Translate is an immutable ArrayAccess object", "phalcon/translate/adapter.zep", 83); return; } @@ -256,12 +254,11 @@ PHP_METHOD(Phalcon_Translate_Adapter, offsetExists) /** * Unsets a translation from the dictionary - * - * @param string offset */ PHP_METHOD(Phalcon_Translate_Adapter, offsetUnset) { - zval *offset, offset_sub; + zval offset_sub; + zval *offset; zval *this_ptr = getThis(); ZVAL_UNDEF(&offset_sub); @@ -276,21 +273,19 @@ PHP_METHOD(Phalcon_Translate_Adapter, offsetUnset) zephir_fetch_params_without_memory_grow(1, 0, &offset); - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_translate_exception_ce, "Translate is an immutable ArrayAccess object", "phalcon/translate/adapter.zep", 104); + ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_translate_exception_ce, "Translate is an immutable ArrayAccess object", "phalcon/translate/adapter.zep", 99); return; } /** * Returns the translation related to the given key - * - * @param string translateKey - * @return string */ PHP_METHOD(Phalcon_Translate_Adapter, offsetGet) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *translateKey, translateKey_sub, _0; + zval translateKey_sub, _0; + zval *translateKey; zval *this_ptr = getThis(); ZVAL_UNDEF(&translateKey_sub); diff --git a/ext/phalcon/translate/adapter.zep.h b/ext/phalcon/translate/adapter.zep.h index 5a44a75756..8d062d5001 100644 --- a/ext/phalcon/translate/adapter.zep.h +++ b/ext/phalcon/translate/adapter.zep.h @@ -31,7 +31,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter__, 0, ZEND_ARG_INFO(0, placeholders) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_translate_adapter_offsetset, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_offsetset, 0, 2, IS_VOID, 0) + ZEND_ARG_INFO(0, offset) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() @@ -40,11 +41,16 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_offset ZEND_ARG_INFO(0, translateKey) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_translate_adapter_offsetunset, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_offsetunset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, offset) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_translate_adapter_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_translate_adapter_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, translateKey) ZEND_END_ARG_INFO() diff --git a/ext/phalcon/validation/message/group.zep.c b/ext/phalcon/validation/message/group.zep.c index 41bc9426a8..2209a7fd5c 100644 --- a/ext/phalcon/validation/message/group.zep.c +++ b/ext/phalcon/validation/message/group.zep.c @@ -15,9 +15,9 @@ #include "kernel/object.h" #include "kernel/memory.h" #include "kernel/array.h" +#include "kernel/operators.h" #include "kernel/exception.h" #include "kernel/fcall.h" -#include "kernel/operators.h" #include "ext/spl/spl_exceptions.h" @@ -81,13 +81,11 @@ PHP_METHOD(Phalcon_Validation_Message_Group, __construct) * $messages[0] * ); * - * - * @param int index - * @return \Phalcon\Validation\Message */ PHP_METHOD(Phalcon_Validation_Message_Group, offsetGet) { - zval *index, index_sub, message, _0; + zval index_sub, message, _0; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -117,17 +115,17 @@ PHP_METHOD(Phalcon_Validation_Message_Group, offsetGet) * * $messages[0] = new \Phalcon\Validation\Message("This is a message"); * - * - * @param int index - * @param \Phalcon\Validation\Message message */ PHP_METHOD(Phalcon_Validation_Message_Group, offsetSet) { - zval *index, index_sub, *message, message_sub; + zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; + zval index_sub, message_sub, _0; + zval *index, *message; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); ZVAL_UNDEF(&message_sub); + ZVAL_UNDEF(&_0); #if PHP_VERSION_ID >= 80000 bool is_null_true = 1; ZEND_PARSE_PARAMETERS_START(2, 2) @@ -137,14 +135,18 @@ PHP_METHOD(Phalcon_Validation_Message_Group, offsetSet) #endif - zephir_fetch_params_without_memory_grow(2, 0, &index, &message); + ZEPHIR_MM_GROW(); + zephir_fetch_params(1, 2, 0, &index, &message); - if (Z_TYPE_P(message) != IS_OBJECT) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STRW(phalcon_validation_exception_ce, "The message must be an object", "phalcon/validation/message/group.zep", 84); + ZEPHIR_INIT_VAR(&_0); + zephir_gettype(&_0, message); + if (!ZEPHIR_IS_STRING(&_0, "object")) { + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_validation_exception_ce, "The message must be an object", "phalcon/validation/message/group.zep", 78); return; } zephir_update_property_array(this_ptr, SL("_messages"), index, message); + ZEPHIR_MM_RESTORE(); } /** @@ -155,13 +157,11 @@ PHP_METHOD(Phalcon_Validation_Message_Group, offsetSet) * isset($message["database"]) * ); * - * - * @param int index - * @return boolean */ PHP_METHOD(Phalcon_Validation_Message_Group, offsetExists) { - zval *index, index_sub, _0; + zval index_sub, _0; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -192,7 +192,8 @@ PHP_METHOD(Phalcon_Validation_Message_Group, offsetUnset) { zephir_method_globals *ZEPHIR_METHOD_GLOBALS_PTR = NULL; zend_long ZEPHIR_LAST_CALL_STATUS; - zval *index, index_sub, _0, _1$$3, _2$$3; + zval index_sub, _0, _1$$3, _2$$3; + zval *index; zval *this_ptr = getThis(); ZVAL_UNDEF(&index_sub); @@ -292,7 +293,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, appendMessages) _0 = Z_TYPE_P(messages) != IS_OBJECT; } if (_0) { - ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_validation_exception_ce, "The messages must be array or object", "phalcon/validation/message/group.zep", 148); + ZEPHIR_THROW_EXCEPTION_DEBUG_STR(phalcon_validation_exception_ce, "The messages must be array or object", "phalcon/validation/message/group.zep", 139); return; } ZEPHIR_OBS_VAR(¤tMessages); @@ -372,7 +373,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, filter) ZEPHIR_OBS_VAR(&messages); zephir_read_property(&messages, this_ptr, ZEND_STRL("_messages"), PH_NOISY_CC); if (Z_TYPE_P(&messages) == IS_ARRAY) { - zephir_is_iterable(&messages, 0, "phalcon/validation/message/group.zep", 210); + zephir_is_iterable(&messages, 0, "phalcon/validation/message/group.zep", 201); if (Z_TYPE_P(&messages) == IS_ARRAY) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(&messages), _0$$3) { @@ -382,7 +383,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, filter) ZEPHIR_CALL_METHOD(&_2$$5, &message, "getfield", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&fieldName, &_2$$5)) { - zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/validation/message/group.zep", 206); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/validation/message/group.zep", 197); } } } ZEND_HASH_FOREACH_END(); @@ -401,7 +402,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, filter) ZEPHIR_CALL_METHOD(&_3$$8, &message, "getfield", NULL, 0); zephir_check_call_status(); if (ZEPHIR_IS_EQUAL(&fieldName, &_3$$8)) { - zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/validation/message/group.zep", 206); + zephir_array_append(&filtered, &message, PH_SEPARATE, "phalcon/validation/message/group.zep", 197); } } ZEPHIR_CALL_METHOD(NULL, &messages, "next", NULL, 0); @@ -465,7 +466,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, current) zephir_read_property(&_0, this_ptr, ZEND_STRL("_messages"), PH_NOISY_CC | PH_READONLY); ZEPHIR_OBS_VAR(&_2); zephir_read_property(&_2, this_ptr, ZEND_STRL("_position"), PH_NOISY_CC); - zephir_array_fetch(&_1, &_0, &_2, PH_NOISY | PH_READONLY, "phalcon/validation/message/group.zep", 236); + zephir_array_fetch(&_1, &_0, &_2, PH_NOISY | PH_READONLY, "phalcon/validation/message/group.zep", 227); RETURN_CTOR(&_1); } @@ -539,7 +540,7 @@ PHP_METHOD(Phalcon_Validation_Message_Group, __set_state) object_init_ex(return_value, phalcon_validation_message_group_ce); - zephir_array_fetch_string(&_0, group, SL("_messages"), PH_NOISY | PH_READONLY, "phalcon/validation/message/group.zep", 271); + zephir_array_fetch_string(&_0, group, SL("_messages"), PH_NOISY | PH_READONLY, "phalcon/validation/message/group.zep", 262); ZEPHIR_CALL_METHOD(NULL, return_value, "__construct", NULL, 2, &_0); zephir_check_call_status(); RETURN_MM(); diff --git a/ext/phalcon/validation/message/group.zep.h b/ext/phalcon/validation/message/group.zep.h index 7cce40a817..551b9c64d5 100644 --- a/ext/phalcon/validation/message/group.zep.h +++ b/ext/phalcon/validation/message/group.zep.h @@ -24,11 +24,16 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_validation_message_group___construct, 0, ZEND_ARG_INFO(0, messages) ZEND_END_ARG_INFO() +#if PHP_VERSION_ID >= 80000 +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_validation_message_group_offsetget, 0, 1, IS_MIXED, 0) +#else ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_validation_message_group_offsetget, 0, 0, 1) +#endif ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_validation_message_group_offsetset, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_validation_message_group_offsetset, 0, 2, IS_VOID, 0) + ZEND_ARG_INFO(0, index) ZEND_ARG_INFO(0, message) ZEND_END_ARG_INFO() @@ -37,7 +42,8 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_validation_message_group ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_validation_message_group_offsetunset, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_phalcon_validation_message_group_offsetunset, 0, 1, IS_VOID, 0) + ZEND_ARG_INFO(0, index) ZEND_END_ARG_INFO() diff --git a/phalcon/annotations/collection.zep b/phalcon/annotations/collection.zep index 0469b28417..1fa0e06e5c 100644 --- a/phalcon/annotations/collection.zep +++ b/phalcon/annotations/collection.zep @@ -87,10 +87,8 @@ class Collection implements \Iterator, \Countable /** * Returns the current annotation in the iterator - * - * @return \Phalcon\Annotations\Annotation */ - public function current() -> | boolean + public function current() -> mixed { var annotation; if fetch annotation, this->_annotations[this->_position] { diff --git a/phalcon/assets/collection.zep b/phalcon/assets/collection.zep index aec1336795..ce90d38dda 100644 --- a/phalcon/assets/collection.zep +++ b/phalcon/assets/collection.zep @@ -230,7 +230,7 @@ class Collection implements \Countable, \Iterator * * @return int */ - public function key() + public function key() -> mixed { return this->_position; } diff --git a/phalcon/di.zep b/phalcon/di.zep index 0ab89635be..ebddad2942 100644 --- a/phalcon/di.zep +++ b/phalcon/di.zep @@ -329,7 +329,7 @@ class Di implements DiInterface /** * Check if a service is registered using the array syntax */ - public function offsetExists(name) -> boolean + public function offsetExists(mixed name) -> bool { return this->has(name); } @@ -341,10 +341,9 @@ class Di implements DiInterface * $di["request"] = new \Phalcon\Http\Request(); * */ - public function offsetSet(name, var definition) -> boolean + public function offsetSet(mixed name, mixed definition) -> void { this->setShared(name, definition); - return true; } /** @@ -354,7 +353,7 @@ class Di implements DiInterface * var_dump($di["request"]); * */ - public function offsetGet(name) -> var + public function offsetGet(mixed name) -> mixed { return this->getShared(name); } @@ -362,9 +361,9 @@ class Di implements DiInterface /** * Removes a service from the services container using the array syntax */ - public function offsetUnset(name) -> boolean + public function offsetUnset(mixed name) -> void { - return false; + this->remove(name); } /** diff --git a/phalcon/forms/form.zep b/phalcon/forms/form.zep index a6e9c502f8..707308a2a4 100644 --- a/phalcon/forms/form.zep +++ b/phalcon/forms/form.zep @@ -736,7 +736,7 @@ class Form extends Injectable implements \Countable, \Iterator /** * Returns the current element in the iterator */ - public function current() -> | boolean + public function current() -> mixed { var element; diff --git a/phalcon/mvc/collection/document.zep b/phalcon/mvc/collection/document.zep index f5815e5abf..7127b4affd 100644 --- a/phalcon/mvc/collection/document.zep +++ b/phalcon/mvc/collection/document.zep @@ -36,7 +36,7 @@ class Document implements EntityInterface, \ArrayAccess * @param int index * @return boolean */ - public function offsetExists(var index) -> boolean + public function offsetExists(mixed index) -> bool { return isset this->{index}; } @@ -44,7 +44,7 @@ class Document implements EntityInterface, \ArrayAccess /** * Returns the value of a field using the ArrayAccess interfase */ - public function offsetGet(var index) + public function offsetGet(var index) -> mixed { var value; if fetch value, this->{index} { @@ -56,7 +56,7 @@ class Document implements EntityInterface, \ArrayAccess /** * Change a value using the ArrayAccess interface */ - public function offsetSet(var index, value) -> void + public function offsetSet(mixed index, mixed value) -> void { let this->{index} = value; } @@ -66,7 +66,7 @@ class Document implements EntityInterface, \ArrayAccess * * @param string offset */ - public function offsetUnset(offset) + public function offsetUnset(mixed offset) -> void { throw new Exception("The index does not exist in the row"); } diff --git a/phalcon/mvc/micro.zep b/phalcon/mvc/micro.zep index 028ca1e137..6e20923e55 100644 --- a/phalcon/mvc/micro.zep +++ b/phalcon/mvc/micro.zep @@ -1060,11 +1060,8 @@ class Micro extends Injectable implements \ArrayAccess /** * Check if a service is registered in the internal services container using the array syntax - * - * @param string alias - * @return boolean */ - public function offsetExists(alias) -> boolean + public function offsetExists(mixed alias) -> bool { return this->hasService(alias); } @@ -1075,11 +1072,8 @@ class Micro extends Injectable implements \ArrayAccess * * $app["request"] = new \Phalcon\Http\Request(); * - * - * @param string alias - * @param mixed definition */ - public function offsetSet(alias, definition) + public function offsetSet(mixed alias, mixed definition) -> void { this->setService(alias, definition); } @@ -1092,11 +1086,8 @@ class Micro extends Injectable implements \ArrayAccess * $app["request"] * ); * - * - * @param string alias - * @return mixed */ - public function offsetGet(alias) + public function offsetGet(mixed alias) -> mixed { return this->getService(alias); } @@ -1106,9 +1097,8 @@ class Micro extends Injectable implements \ArrayAccess * * @param string alias */ - public function offsetUnset(alias) + public function offsetUnset(mixed alias) -> void { - return alias; } /** diff --git a/phalcon/mvc/model/resultset.zep b/phalcon/mvc/model/resultset.zep index bb53a61eca..23564682e8 100644 --- a/phalcon/mvc/model/resultset.zep +++ b/phalcon/mvc/model/resultset.zep @@ -278,7 +278,7 @@ abstract class Resultset /** * Checks whether offset exists in the resultset */ - public function offsetExists(index) -> boolean + public function offsetExists(mixed index) -> bool { return index < this->_count; } @@ -286,7 +286,7 @@ abstract class Resultset /** * Gets row in a specific position of the resultset */ - public function offsetGet(index) -> | boolean + public function offsetGet(mixed index) -> mixed { if index < this->_count { /** @@ -306,7 +306,7 @@ abstract class Resultset * @param int index * @param \Phalcon\Mvc\ModelInterface value */ - public function offsetSet(var index, var value) + public function offsetSet(mixed index, mixed value) -> void { throw new Exception("Cursor is an immutable ArrayAccess object"); } @@ -314,7 +314,7 @@ abstract class Resultset /** * Resultsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface */ - public function offsetUnset(offset) + public function offsetUnset(mixed offset) -> void { throw new Exception("Cursor is an immutable ArrayAccess object"); } diff --git a/phalcon/mvc/model/resultset/complex.zep b/phalcon/mvc/model/resultset/complex.zep index 7f9155454a..b5e63f19df 100644 --- a/phalcon/mvc/model/resultset/complex.zep +++ b/phalcon/mvc/model/resultset/complex.zep @@ -62,7 +62,7 @@ class Complex extends Resultset implements ResultsetInterface /** * Returns current row in the resultset */ - public final function current() -> | boolean + final public function current() -> mixed { var row, hydrateMode, eager, dirtyState, alias, activeRow, type, column, columnValue, diff --git a/phalcon/mvc/model/resultset/simple.zep b/phalcon/mvc/model/resultset/simple.zep index 5c7ce38070..10dcaf0773 100644 --- a/phalcon/mvc/model/resultset/simple.zep +++ b/phalcon/mvc/model/resultset/simple.zep @@ -64,7 +64,7 @@ class Simple extends Resultset /** * Returns current row in the resultset */ - public final function current() -> | boolean + final public function current() -> mixed { var row, hydrateMode, columnMap, activeRow, modelName; diff --git a/phalcon/mvc/model/row.zep b/phalcon/mvc/model/row.zep index 2385efa00f..449e30bd48 100644 --- a/phalcon/mvc/model/row.zep +++ b/phalcon/mvc/model/row.zep @@ -46,22 +46,16 @@ class Row extends stdClass implements ArrayAccess, EntityInterface, ResultInterf /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * Checks whether offset exists in the row - * - * @param string|int $index - * @return boolean */ - public function offsetExists(var index) -> boolean + public function offsetExists(mixed index) -> bool { return isset this->{index}; } /** * Gets a record in a specific position of the row - * - * @param string|int index - * @return string|Phalcon\Mvc\ModelInterface */ - public function offsetGet(var index) + public function offsetGet(mixed index) -> mixed { if !this->offsetExists(index) { throw new Exception("The index does not exist in the row"); @@ -72,9 +66,6 @@ class Row extends stdClass implements ArrayAccess, EntityInterface, ResultInterf /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface - * - * @param string|int index - * @param \Phalcon\Mvc\ModelInterface value */ public function offsetSet(mixed element, mixed value) -> void { @@ -83,8 +74,6 @@ class Row extends stdClass implements ArrayAccess, EntityInterface, ResultInterf /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface - * - * @param string|int offset */ public function offsetUnset(mixed element) -> void { diff --git a/phalcon/registry.zep b/phalcon/registry.zep index fdb6c840ea..231a40e968 100644 --- a/phalcon/registry.zep +++ b/phalcon/registry.zep @@ -93,7 +93,7 @@ final class Registry implements \ArrayAccess, \Countable, \Iterator /** * Returns an index in the registry */ - public final function offsetGet(var offset) -> var + public final function offsetGet(var offset) -> mixed { return this->_data[offset]; } @@ -157,7 +157,7 @@ final class Registry implements \ArrayAccess, \Countable, \Iterator /** * Obtains the current value in the internal iterator */ - public function current() + public function current() -> mixed { return current(this->_data); } diff --git a/phalcon/session/bag.zep b/phalcon/session/bag.zep index 7ba1103166..bc959e614a 100644 --- a/phalcon/session/bag.zep +++ b/phalcon/session/bag.zep @@ -287,22 +287,22 @@ class Bag implements InjectionAwareInterface, BagInterface, \IteratorAggregate, return new \ArrayIterator(this->_data); } - public final function offsetSet(var property, var value) + public final function offsetSet(mixed property, mixed value) -> void { - return this->set(property, value); + this->set(property, value); } - public final function offsetExists(var property) -> boolean + public final function offsetExists(mixed property) -> bool { return this->has(property); } - public final function offsetUnset(var property) + public final function offsetUnset(mixed property) -> void { - return this->remove(property); + this->remove(property); } - public final function offsetGet(var property) -> var + public final function offsetGet(mixed property) -> mixed { return this->get(property); } diff --git a/phalcon/translate/adapter.zep b/phalcon/translate/adapter.zep index 78dc6a4a94..e18c5261f9 100644 --- a/phalcon/translate/adapter.zep +++ b/phalcon/translate/adapter.zep @@ -77,11 +77,8 @@ abstract class Adapter implements AdapterInterface /** * Sets a translation value - * - * @param string offset - * @param string value */ - public function offsetSet(var offset, var value) + public function offsetSet(mixed offset, mixed value) -> void { throw new Exception("Translate is an immutable ArrayAccess object"); } @@ -89,28 +86,23 @@ abstract class Adapter implements AdapterInterface /** * Check whether a translation key exists */ - public function offsetExists(var translateKey) -> boolean + public function offsetExists(var translateKey) -> bool { return this->{"exists"}(translateKey); } /** * Unsets a translation from the dictionary - * - * @param string offset */ - public function offsetUnset(var offset) + public function offsetUnset(mixed offset) -> void { throw new Exception("Translate is an immutable ArrayAccess object"); } /** * Returns the translation related to the given key - * - * @param string translateKey - * @return string */ - public function offsetGet(var translateKey) + public function offsetGet(mixed translateKey) -> mixed { return this->{"query"}(translateKey, null); } diff --git a/phalcon/validation/message/group.zep b/phalcon/validation/message/group.zep index 11b5d6951a..389703636a 100644 --- a/phalcon/validation/message/group.zep +++ b/phalcon/validation/message/group.zep @@ -55,11 +55,8 @@ class Group implements \Countable, \ArrayAccess, \Iterator * $messages[0] * ); * - * - * @param int index - * @return \Phalcon\Validation\Message */ - public function offsetGet(var index) -> | boolean + public function offsetGet(mixed index) -> mixed { var message; if fetch message, this->_messages[index] { @@ -74,11 +71,8 @@ class Group implements \Countable, \ArrayAccess, \Iterator * * $messages[0] = new \Phalcon\Validation\Message("This is a message"); * - * - * @param int index - * @param \Phalcon\Validation\Message message */ - public function offsetSet(var index, var message) + public function offsetSet(mixed index, mixed message) -> void { if typeof message != "object" { throw new Exception("The message must be an object"); @@ -94,11 +88,8 @@ class Group implements \Countable, \ArrayAccess, \Iterator * isset($message["database"]) * ); * - * - * @param int index - * @return boolean */ - public function offsetExists(var index) -> boolean + public function offsetExists(mixed index) -> bool { return isset this->_messages[index]; } @@ -110,7 +101,7 @@ class Group implements \Countable, \ArrayAccess, \Iterator * unset($message["database"]); * */ - public function offsetUnset(var index) + public function offsetUnset(mixed index) -> void { if isset this->_messages[index] { array_splice(this->_messages, index, 1);