Skip to content

Commit 0d680a2

Browse files
Reflection: remove unneeded indentation support from _zend_extension_string()
The only caller (`ReflectionZendExtension::__toString()`) always provided an empty string as the indentation; removing the indentation slightly simplifies the building of the string representation.
1 parent 4427cb4 commit 0d680a2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ext/reflection/php_reflection.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void _class_const_string(smart_str *str, const zend_string *name, zend_cl
301301
static void _enum_case_string(smart_str *str, const zend_string *name, zend_class_constant *c, const char* indent);
302302
static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, const char *indent);
303303
static void _extension_string(smart_str *str, const zend_module_entry *module);
304-
static void _zend_extension_string(smart_str *str, const zend_extension *extension, const char *indent);
304+
static void _zend_extension_string(smart_str *str, const zend_extension *extension);
305305

306306
/* {{{ _class_string */
307307
static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, const char *indent)
@@ -1347,9 +1347,9 @@ static void reflect_attributes(INTERNAL_FUNCTION_PARAMETERS, HashTable *attribut
13471347
}
13481348
/* }}} */
13491349

1350-
static void _zend_extension_string(smart_str *str, const zend_extension *extension, const char *indent) /* {{{ */
1350+
static void _zend_extension_string(smart_str *str, const zend_extension *extension) /* {{{ */
13511351
{
1352-
smart_str_append_printf(str, "%sZend Extension [ %s ", indent, extension->name);
1352+
smart_str_append_printf(str, "Zend Extension [ %s ", extension->name);
13531353

13541354
if (extension->version) {
13551355
smart_str_append_printf(str, "%s ", extension->version);
@@ -7230,7 +7230,7 @@ ZEND_METHOD(ReflectionZendExtension, __toString)
72307230

72317231
ZEND_PARSE_PARAMETERS_NONE();
72327232
GET_REFLECTION_OBJECT_PTR(extension);
7233-
_zend_extension_string(&str, extension, "");
7233+
_zend_extension_string(&str, extension);
72347234
RETURN_STR(smart_str_extract(&str));
72357235
}
72367236
/* }}} */

0 commit comments

Comments
 (0)