Skip to content

Commit 87785c7

Browse files
committed
tabs
1 parent d39aa98 commit 87785c7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Zend/zend_compile.c

+14-14
Original file line numberDiff line numberDiff line change
@@ -3804,9 +3804,9 @@ static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
38043804

38053805
/* one more thing: make sure we properly implement an abstract method */
38063806
if (existing_fn && existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
3807-
prototype = fn->common.prototype;
3807+
prototype = fn->common.prototype;
38083808
do_inheritance_check_on_method(fn, existing_fn TSRMLS_CC);
3809-
fn->common.prototype = prototype;
3809+
fn->common.prototype = prototype;
38103810
}
38113811

38123812
/* delete inherited fn if the function to be added is not abstract */
@@ -3834,9 +3834,9 @@ static int zend_traits_merge_functions_to_class(zend_function *fn TSRMLS_DC, int
38343834
if (zend_hash_quick_update(&ce->function_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, &fn_copy, sizeof(zend_function), (void**)&fn_copy_p)==FAILURE) {
38353835
zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occurred during updating class method table", hash_key->arKey);
38363836
}
3837-
3837+
38383838
zend_add_magic_methods(ce, hash_key->arKey, hash_key->nKeyLength, fn_copy_p TSRMLS_CC);
3839-
3839+
38403840
zend_function_dtor(fn);
38413841
} else {
38423842
zend_function_dtor(fn);
@@ -4028,9 +4028,9 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
40284028

40294029
/** And, ensure that the referenced method is resolvable, too. */
40304030
lcname = zend_str_tolower_dup(cur_method_ref->method_name,
4031-
cur_method_ref->mname_len);
4031+
cur_method_ref->mname_len);
40324032
method_exists = zend_hash_exists(&cur_method_ref->ce->function_table,
4033-
lcname, cur_method_ref->mname_len + 1);
4033+
lcname, cur_method_ref->mname_len + 1);
40344034
efree(lcname);
40354035

40364036
if (!method_exists) {
@@ -5012,11 +5012,11 @@ void zend_do_begin_class_declaration(const znode *class_token, znode *class_name
50125012
opline->op2_type = IS_CONST;
50135013

50145014
if (doing_inheritance) {
5015-
/* Make sure a trait does not try to extend a class */
5016-
if ((new_class_entry->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
5017-
zend_error(E_COMPILE_ERROR, "A trait (%s) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error", new_class_entry->name);
5018-
}
5019-
5015+
/* Make sure a trait does not try to extend a class */
5016+
if ((new_class_entry->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
5017+
zend_error(E_COMPILE_ERROR, "A trait (%s) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error", new_class_entry->name);
5018+
}
5019+
50205020
opline->extended_value = parent_class_name->u.op.var;
50215021
opline->opcode = ZEND_DECLARE_INHERITED_CLASS;
50225022
} else {
@@ -6961,9 +6961,9 @@ void zend_do_use(znode *ns_name, znode *new_name, int is_global TSRMLS_DC) /* {{
69616961
lcname = zend_str_tolower_dup(Z_STRVAL_P(name), Z_STRLEN_P(name));
69626962

69636963
if (((Z_STRLEN_P(name) == sizeof("self")-1) &&
6964-
!memcmp(lcname, "self", sizeof("self")-1)) ||
6965-
((Z_STRLEN_P(name) == sizeof("parent")-1) &&
6966-
!memcmp(lcname, "parent", sizeof("parent")-1))) {
6964+
!memcmp(lcname, "self", sizeof("self")-1)) ||
6965+
((Z_STRLEN_P(name) == sizeof("parent")-1) &&
6966+
!memcmp(lcname, "parent", sizeof("parent")-1))) {
69676967
zend_error(E_COMPILE_ERROR, "Cannot use %s as %s because '%s' is a special class name", Z_STRVAL_P(ns), Z_STRVAL_P(name), Z_STRVAL_P(name));
69686968
}
69696969

0 commit comments

Comments
 (0)