diff options
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 20711bc7ed..144714b47a 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4185,16 +4185,10 @@ ZEND_METHOD(reflection_class, getMethods) { reflection_object *intern; zend_class_entry *ce; - zend_long filter = 0; - int argc = ZEND_NUM_ARGS(); + zend_long filter = ZEND_ACC_PPP_MASK | ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL | ZEND_ACC_STATIC; - if (argc) { - if (zend_parse_parameters(argc, "|l", &filter) == FAILURE) { - return; - } - } else { - /* No parameters given, default to "return all" */ - filter = ZEND_ACC_PPP_MASK | ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL | ZEND_ACC_STATIC; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { + return; } GET_REFLECTION_OBJECT_PTR(ce); @@ -4377,16 +4371,10 @@ ZEND_METHOD(reflection_class, getProperties) { reflection_object *intern; zend_class_entry *ce; - zend_long filter = 0; - int argc = ZEND_NUM_ARGS(); + zend_long filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC; - if (argc) { - if (zend_parse_parameters(argc, "|l", &filter) == FAILURE) { - return; - } - } else { - /* No parameters given, default to "return all" */ - filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC; + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { + return; } GET_REFLECTION_OBJECT_PTR(ce); |