diff options
author | Marcus Boerger <helly@php.net> | 2003-08-31 15:30:13 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2003-08-31 15:30:13 +0000 |
commit | 660c14e74a7e4f5196590b0ebb6bdf05ac8c6716 (patch) | |
tree | d05bff63cf9b547015eaa36cfa9b59c2a919b399 /ext/reflection/php_reflection.c | |
parent | 4af06210362887a7db3b6916ed8262b6276d2331 (diff) | |
download | php-git-660c14e74a7e4f5196590b0ebb6bdf05ac8c6716.tar.gz |
Beautify output
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index ac67c716f2..42747800a0 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -301,7 +301,7 @@ static void _class_string(string *str, zend_class_entry *ce, char *indent TSRMLS string_printf(str, "\n"); count = zend_hash_num_elements(&ce->function_table); - string_printf(str, "%s - Methods [%d] {\n", indent, count); + string_printf(str, "%s - Methods [%d] {", indent, count); if (count > 0) { HashPosition pos; zend_function *mptr; @@ -309,12 +309,13 @@ static void _class_string(string *str, zend_class_entry *ce, char *indent TSRMLS zend_hash_internal_pointer_reset_ex(&ce->function_table, &pos); while (zend_hash_get_current_data_ex(&ce->function_table, (void **) &mptr, &pos) == SUCCESS) { + string_printf(str, "\n"); _function_string(str, mptr, " " TSRMLS_CC); zend_hash_move_forward_ex(&ce->function_table, &pos); - string_printf(str, "\n"); } + } else { + string_printf(str, "\n"); } - string_printf(str, "\n"); string_printf(str, " }\n"); } @@ -350,9 +351,10 @@ static void _function_parameter_string(string *str, zend_function *fptr, char* i return; } - string_printf(str, "%sParameters [%d] {\n", indent, fptr->common.num_args); + string_printf(str, "\n"); + string_printf(str, "%s- Parameters [%d] {\n", indent, fptr->common.num_args); for (i = 0; i < fptr->common.num_args; i++) { - string_printf(str, "%s - ", indent); + string_printf(str, "%s ", indent); _parameter_string(str, arg_info, i, indent TSRMLS_CC); string_write(str, "\n", sizeof("\n")-1); arg_info++; |