]> granicus.if.org Git - php/commitdiff
Fixed white spaces
authorDmitry Stogov <dmitry@zend.com>
Fri, 20 Mar 2015 08:10:29 +0000 (11:10 +0300)
committerDmitry Stogov <dmitry@zend.com>
Fri, 20 Mar 2015 08:10:29 +0000 (11:10 +0300)
Zend/tests/typehints/scalar_basic.phpt
Zend/tests/typehints/scalar_none.phpt
Zend/tests/typehints/scalar_null.phpt
Zend/tests/typehints/scalar_return_basic.phpt
Zend/tests/typehints/scalar_strict.phpt
Zend/tests/typehints/scalar_strict_basic.phpt
Zend/zend_API.c
Zend/zend_compile.c
Zend/zend_execute.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h

index ef632f0069df8097f6ce2a5f095f37797de9ec98..08a0121bbe15cab9151f18efb7a6f6cef9765e3e 100644 (file)
@@ -50,9 +50,9 @@ foreach ($functions as $type => $function) {
         echo PHP_EOL . "*** Trying ";
         var_dump($value);
         try {
-               var_dump($function($value));
+            var_dump($function($value));
         } catch (\TypeException $e) {
-               echo "*** Caught " . $e->getMessage() . PHP_EOL;
+            echo "*** Caught " . $e->getMessage() . PHP_EOL;
         }
     }
 }
@@ -274,4 +274,4 @@ bool(false)
 *** Trying resource(%d) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type boolean, resource given, called in %s on line %d
 
-Done
\ No newline at end of file
+Done
index e450f1a16b1f736e790c783e6d4869ef2955c0dd..af6d8c8dfaa22bafe393622d875b13e698267f5c 100644 (file)
@@ -27,9 +27,9 @@ $functions = [
 foreach ($functions as $type => $function) {
     echo "Testing $type:", PHP_EOL;
     try {
-       var_dump($function());
+        var_dump($function());
     } catch (TypeException $e) {
-       echo "*** Caught " . $e->getMessage() . PHP_EOL;
+        echo "*** Caught " . $e->getMessage() . PHP_EOL;
     }
 }
 echo PHP_EOL . "Done";
@@ -51,4 +51,4 @@ NULL
 Testing bool nullable:
 NULL
 
-Done
\ No newline at end of file
+Done
index ff6a3d4206b8cf8b70c665cec18cf6df2db79be2..e149388ef09e7592053a55fae79839e3bd5d5dc1 100644 (file)
@@ -27,9 +27,9 @@ $functions = [
 foreach ($functions as $type => $function) {
     echo "Testing $type:", PHP_EOL;
     try {
-       var_dump($function(null));
+        var_dump($function(null));
     } catch (TypeException $e) {
-       echo "*** Caught " . $e->getMessage() . PHP_EOL;
+        echo "*** Caught " . $e->getMessage() . PHP_EOL;
     }
 }
 
@@ -53,4 +53,4 @@ NULL
 Testing bool nullable:
 NULL
 
-Done
\ No newline at end of file
+Done
index eff1bbf066d0c07c340a0ff655f8cf9518fe7897..d33fb5dff1554cc3cf61402d560842f51a59f957 100644 (file)
@@ -51,9 +51,9 @@ foreach ($functions as $type => $function) {
         echo "*** Trying ";
         var_dump($value);
         try {
-               var_dump($function($value));
+            var_dump($function($value));
         } catch (TypeException $e) {
-               echo "*** Caught " . $e->getMessage() . PHP_EOL;
+            echo "*** Caught " . $e->getMessage() . PHP_EOL;
         }
     }
 }
@@ -211,4 +211,4 @@ bool(false)
 *** Trying resource(5) of type (stream)
 *** Caught Return value of {closure}() must be of the type boolean, resource returned in %s on line %d
 
-Done
\ No newline at end of file
+Done
index 44c83cfbb0ef70f0d5e687c699fcca017be442c3..400c7d5cf84e74fad0874a80cb3080d8a67f9421 100644 (file)
@@ -52,9 +52,9 @@ foreach ($functions as $type => $function) {
         echo PHP_EOL . "*** Trying ";
         var_dump($value);
         try {
-               var_dump($function($value));
+            var_dump($function($value));
         } catch (TypeException $e) {
-               echo "*** Caught " . $e->getMessage() . PHP_EOL;
+            echo "*** Caught " . $e->getMessage() . PHP_EOL;
         }
     }
 }
@@ -274,4 +274,4 @@ bool(false)
 *** Trying resource(5) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type boolean, resource given, called in %s on line %d
 
-Done
\ No newline at end of file
+Done
index dcbf93135db5fff39f9aea4c77be1b2d89709a29..d56af159d74d2d42f34098abcd98fafc6510f901 100644 (file)
@@ -53,9 +53,9 @@ foreach ($functions as $type => $function) {
         $errored = false;
         echo PHP_EOL . "*** Trying ", type($value), " value", PHP_EOL;
         try {
-               var_dump($function($value));
+            var_dump($function($value));
         } catch (TypeException $e) {
-               echo "*** Caught " . $e->getMessage() . PHP_EOL;
+            echo "*** Caught " . $e->getMessage() . PHP_EOL;
         }
     }
 }
@@ -178,4 +178,4 @@ bool(false)
 *** Trying resource value
 *** Caught Argument 1 passed to {closure}() must be of the type boolean, resource given, called in %s on line %d
 
-Done
\ No newline at end of file
+Done
index dac6f16754c29545dedd60ddea5123e664be4267..1ef695dd4e932d69be1a794ddb4c1327a9c86a7d 100644 (file)
@@ -677,7 +677,7 @@ static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va,
                                        if (!quiet) {
                                                zend_function *active_function = EG(current_execute_data)->func;
                                                const char *class_name = active_function->common.scope ? active_function->common.scope->name->val : "";
-                                               
+
                                                zend_error(E_WARNING, "%s%s%s(): only one varargs specifier (* or +) is permitted",
                                                                class_name,
                                                                class_name[0] ? "::" : "",
index 341e2326d7f2bb71636a5e39be3c17a1a2719a96..d0c7264eec0a9319da944f03bfff357a4fd44319 100644 (file)
@@ -170,9 +170,9 @@ static zend_always_inline const scalar_typehint_info* zend_find_scalar_typehint(
 /* }}} */
 
 ZEND_API void zend_assert_valid_class_name(const zend_string *const_name) /* {{{ */
-{      
+{
        const scalar_typehint_info *info = zend_find_scalar_typehint(const_name);
-       
+
        if (info) {
                zend_error_noreturn(E_COMPILE_ERROR, "\"%s\" cannot be used as a class name", info->name);
        }
@@ -180,9 +180,9 @@ ZEND_API void zend_assert_valid_class_name(const zend_string *const_name) /* {{{
 /* }}} */
 
 static zend_always_inline zend_uchar zend_lookup_scalar_typehint_by_name(const zend_string *const_name) /* {{{ */
-{      
+{
        const scalar_typehint_info *info = zend_find_scalar_typehint(const_name);
-       
+
        if (info) {
                if (const_name->len != info->name_len) {
                        zend_error_noreturn(E_COMPILE_ERROR, "\"%s\" cannot be used as a type declaration", const_name->val);
@@ -4031,7 +4031,7 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */
                        ZVAL_COPY_VALUE(&CG(declarables).ticks, &value_zv);
                        zval_dtor(&value_zv);
                } else if (zend_string_equals_literal_ci(name, "encoding")) {
-                       
+
                        if (FAILURE == zend_declare_is_first_statement(ast)) {
                                zend_error_noreturn(E_COMPILE_ERROR, "Encoding declaration pragma must be "
                                        "the very first statement in the script");
@@ -4046,7 +4046,7 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */
 
                        if (ast->child[1] != NULL) {
                                zend_error_noreturn(E_COMPILE_ERROR, "strict_types declaration must not "
-                                       "use block mode");   
+                                       "use block mode");
                        }
 
                        zend_const_expr_to_zval(&value_zv, value_ast);
@@ -4058,7 +4058,7 @@ void zend_compile_declare(zend_ast *ast) /* {{{ */
                        if (Z_LVAL(value_zv) == 1) {
                                CG(active_op_array)->fn_flags |= ZEND_ACC_STRICT_TYPES;
                        }
-                       
+
                } else {
                        zend_error(E_COMPILE_WARNING, "Unsupported declare '%s'", name->val);
                }
@@ -4236,7 +4236,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast, zend_bool is_
                                if (type != 0) {
                                        arg_info->type_hint = type;
                                } else {
-                               
+
                                        if (zend_is_const_default_class_ref(type_ast)) {
                                                class_name = zend_resolve_class_name_ast(type_ast);
                                        } else {
index 6bc9df624bf39912edd41911cbad23294a04ac21..699c1ca3ded0361d29b7f26edc8ec1b356ab5bfd 100644 (file)
@@ -621,8 +621,8 @@ ZEND_API void zend_verify_arg_error(const zend_function *zf, uint32_t arg_num, c
                }
 
                if (ptr && ptr->func && ZEND_USER_CODE(ptr->func->common.type)) {
-                       zend_type_error("Argument %d passed to %s%s%s() must %s%s, %s%s given, called in %s on line %d", 
-                                       arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind, 
+                       zend_type_error("Argument %d passed to %s%s%s() must %s%s, %s%s given, called in %s on line %d",
+                                       arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind,
                                        ptr->func->op_array.filename->val, ptr->opline->lineno);
                } else {
                        zend_type_error("Argument %d passed to %s%s%s() must %s%s, %s%s given", arg_num, fclass, fsep, fname, need_msg, need_kind, given_msg, given_kind);
index 015d6cbc14b269584caf5528ed35df61f5ca81f8..2cc3588606cd9eaf920f867d540f42518d23c1c7 100644 (file)
@@ -3600,12 +3600,12 @@ ZEND_VM_HANDLER(124, ZEND_VERIFY_RETURN_TYPE, CONST|TMP|VAR|UNUSED|CV, UNUSED)
                zend_arg_info *ret_info = EX(func)->common.arg_info - 1;
 
                retval_ptr = GET_OP1_ZVAL_PTR(BP_VAR_R);
-               
-               if (UNEXPECTED(!ret_info->class_name 
-                       && ret_info->type_hint != IS_CALLABLE 
+
+               if (UNEXPECTED(!ret_info->class_name
+                       && ret_info->type_hint != IS_CALLABLE
                        && !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(retval_ptr)))) {
                        /* A cast or an error will happen, so separate the zval to prevent overwriting it */
-                       
+
                        if (EXPECTED((opline->extended_value & ZEND_RETURN_REF) == 0)) {
                                /* Does not return by reference */
                                SEPARATE_ZVAL(retval_ptr);
@@ -4441,7 +4441,7 @@ ZEND_VM_HANDLER(164, ZEND_RECV_VARIADIC, ANY, ANY)
                ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(params)) {
                        param = EX_VAR_NUM(EX(func)->op_array.last_var + EX(func)->op_array.T);
                        if (UNEXPECTED((EX(func)->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) != 0)) {
-                               do {                    
+                               do {
                                        zend_verify_arg_type(EX(func), arg_num, param, NULL, EX_USES_STRICT_TYPES());
                                        if (Z_OPT_REFCOUNTED_P(param)) Z_ADDREF_P(param);
                                        ZEND_HASH_FILL_ADD(param);
@@ -7394,4 +7394,5 @@ ZEND_VM_HANDLER(157, ZEND_FETCH_CLASS_NAME, ANY, ANY)
                ZVAL_EMPTY_STRING(EX_VAR(opline->result.var));
        }
        ZEND_VM_NEXT_OPCODE();
-}
\ No newline at end of file
+}
+
index 390d829b0dce9f99b3ca7972e3f853e8be96f633..2ee2cf4d53cae0bdb970442ffbd985595fe21999 100644 (file)
@@ -1789,7 +1789,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_NAME_SPEC_HANDLER(
                ZVAL_EMPTY_STRING(EX_VAR(opline->result.var));
        }
        ZEND_VM_NEXT_OPCODE();
-}static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
+}
+
+static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
 {
        USE_OPLINE