summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 5f7dd80435..d31a99bd3f 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2817,22 +2817,6 @@ ZEND_METHOD(reflection_type, allowsNull)
}
/* }}} */
-/* {{{ proto public bool ReflectionType::isBuiltin()
- Returns whether parameter is a builtin type */
-ZEND_METHOD(reflection_type, isBuiltin)
-{
- reflection_object *intern;
- type_reference *param;
-
- if (zend_parse_parameters_none() == FAILURE) {
- return;
- }
- GET_REFLECTION_OBJECT_PTR(param);
-
- RETVAL_BOOL(ZEND_TYPE_IS_CODE(param->type));
-}
-/* }}} */
-
/* {{{ reflection_type_name */
static zend_string *reflection_type_name(type_reference *param) {
if (ZEND_TYPE_IS_NAME(param->type)) {
@@ -2863,7 +2847,7 @@ ZEND_METHOD(reflection_type, __toString)
/* }}} */
/* {{{ proto public string ReflectionNamedType::getName()
- Return the text of the type hint */
+ Return the name of the type */
ZEND_METHOD(reflection_named_type, getName)
{
reflection_object *intern;
@@ -2878,6 +2862,22 @@ ZEND_METHOD(reflection_named_type, getName)
}
/* }}} */
+/* {{{ proto public bool ReflectionNamedType::isBuiltin()
+ Returns whether type is a builtin type */
+ZEND_METHOD(reflection_named_type, isBuiltin)
+{
+ reflection_object *intern;
+ type_reference *param;
+
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+ GET_REFLECTION_OBJECT_PTR(param);
+
+ RETVAL_BOOL(ZEND_TYPE_IS_CODE(param->type));
+}
+/* }}} */
+
/* {{{ proto public static mixed ReflectionMethod::export(mixed class, string name [, bool return]) throws ReflectionException
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
ZEND_METHOD(reflection_method, export)
@@ -6645,13 +6645,13 @@ static const zend_function_entry reflection_parameter_functions[] = {
static const zend_function_entry reflection_type_functions[] = {
ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_type, allowsNull, arginfo_reflection__void, 0)
- ZEND_ME(reflection_type, isBuiltin, arginfo_reflection__void, 0)
ZEND_ME(reflection_type, __toString, arginfo_reflection__void, ZEND_ACC_DEPRECATED)
PHP_FE_END
};
static const zend_function_entry reflection_named_type_functions[] = {
ZEND_ME(reflection_named_type, getName, arginfo_reflection__void, 0)
+ ZEND_ME(reflection_named_type, isBuiltin, arginfo_reflection__void, 0)
PHP_FE_END
};