summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-11-26 14:00:42 +0100
committerNikita Popov <nikita.ppv@gmail.com>2018-11-26 14:00:42 +0100
commit55bd88ce0d1bf461546d5d0b40920491d566ed48 (patch)
treea7adf463fad5194d6c0c23a231679bfb3a1c3e5b /ext/reflection/php_reflection.c
parente7131a4e9fa0acf8fc1e486b49851e71859ef5b8 (diff)
downloadphp-git-55bd88ce0d1bf461546d5d0b40920491d566ed48.tar.gz
Remove redundant __clone() methods from Reflection
Reflection classes already use NULLed clone_obj to signal that they cannot be cloned, so it's not necessary to additionally declare a throwing __clone() method.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 872e143088..2796c7b7a8 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -1407,14 +1407,6 @@ static zend_op *_reflection_param_get_default_precv(INTERNAL_FUNCTION_PARAMETERS
}
/* }}} */
-/* {{{ Preventing __clone from being called */
-ZEND_METHOD(reflection, __clone)
-{
- /* Should never be executable */
- _DO_THROW("Cannot clone object using __clone()");
-}
-/* }}} */
-
/* {{{ proto public static mixed Reflection::export(Reflector r [, bool return])
Exports a reflection object. Returns the output if TRUE is specified for return, printing it otherwise. */
ZEND_METHOD(reflection, export)
@@ -6097,7 +6089,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_function_invokeArgs, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry reflection_function_abstract_functions[] = {
- ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_function, inNamespace, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, isClosure, arginfo_reflection__void, 0)
ZEND_ME(reflection_function, isDeprecated, arginfo_reflection__void, 0)
@@ -6283,7 +6274,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_class_implementsInterface, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry reflection_class_functions[] = {
- ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_class, export, arginfo_reflection_class_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
ZEND_ME(reflection_class, __construct, arginfo_reflection_class___construct, 0)
ZEND_ME(reflection_class, __toString, arginfo_reflection__void, 0)
@@ -6382,7 +6372,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_property_setAccessible, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry reflection_property_functions[] = {
- ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_property, export, arginfo_reflection_property_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
ZEND_ME(reflection_property, __construct, arginfo_reflection_property___construct, 0)
ZEND_ME(reflection_property, __toString, arginfo_reflection__void, 0)
@@ -6413,7 +6402,6 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_class_constant___construct, 0, 0, 2)
ZEND_END_ARG_INFO()
static const zend_function_entry reflection_class_constant_functions[] = {
- ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_class_constant, export, arginfo_reflection_class_constant_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
ZEND_ME(reflection_class_constant, __construct, arginfo_reflection_class_constant___construct, 0)
ZEND_ME(reflection_class_constant, __toString, arginfo_reflection__void, 0)
@@ -6440,7 +6428,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_parameter___construct, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry reflection_parameter_functions[] = {
- ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_parameter, export, arginfo_reflection_parameter_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
ZEND_ME(reflection_parameter, __construct, arginfo_reflection_parameter___construct, 0)
ZEND_ME(reflection_parameter, __toString, arginfo_reflection__void, 0)
@@ -6466,7 +6453,6 @@ 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)
/* ReflectionType::__toString() is deprecated, but we currently do not mark it as such
@@ -6491,7 +6477,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_extension___construct, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry reflection_extension_functions[] = {
- ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_extension, export, arginfo_reflection_extension_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
ZEND_ME(reflection_extension, __construct, arginfo_reflection_extension___construct, 0)
ZEND_ME(reflection_extension, __toString, arginfo_reflection__void, 0)
@@ -6514,7 +6499,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_reflection_zend_extension___construct, 0)
ZEND_END_ARG_INFO()
static const zend_function_entry reflection_zend_extension_functions[] = {
- ZEND_ME(reflection, __clone, arginfo_reflection__void, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL)
ZEND_ME(reflection_zend_extension, export, arginfo_reflection_extension_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC)
ZEND_ME(reflection_zend_extension, __construct, arginfo_reflection_zend_extension___construct, 0)
ZEND_ME(reflection_zend_extension, __toString, arginfo_reflection__void, 0)