From: Stanislav Malyshev Date: Mon, 3 Dec 2018 00:00:44 +0000 (-0800) Subject: Merge remote-tracking branch 'github/pr/3345' X-Git-Tag: php-7.4.0alpha1~1454 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05776094f7c42c1c3f97503856ab9a3787d9caef;p=php Merge remote-tracking branch 'github/pr/3345' * github/pr/3345: Update Coding style --- 05776094f7c42c1c3f97503856ab9a3787d9caef diff --cc run-tests.php index 46fabbb577,4ec7cf5200..863a518890 mode 100755,100644..100755 --- a/run-tests.php +++ b/run-tests.php @@@ -240,33 -240,32 +240,33 @@@ if (getenv('TEST_PHP_USER')) $exts_to_test = array(); $ini_overwrites = array( - 'output_handler=', - 'open_basedir=', - 'disable_functions=', - 'output_buffering=Off', - 'error_reporting=' . (E_ALL | E_STRICT), - 'display_errors=1', - 'display_startup_errors=1', - 'log_errors=0', - 'html_errors=0', - 'track_errors=0', - 'report_memleaks=1', - 'report_zend_debug=0', - 'docref_root=', - 'docref_ext=.html', - 'error_prepend_string=', - 'error_append_string=', - 'auto_prepend_file=', - 'auto_append_file=', - 'ignore_repeated_errors=0', - 'precision=14', - 'memory_limit=128M', - 'log_errors_max_len=0', - 'opcache.fast_shutdown=0', - 'opcache.file_update_protection=0', - 'opcache.preload=', - 'zend.assertions=1', - ); + 'output_handler=', + 'open_basedir=', + 'disable_functions=', + 'output_buffering=Off', + 'error_reporting=' . (E_ALL | E_STRICT), + 'display_errors=1', + 'display_startup_errors=1', + 'log_errors=0', + 'html_errors=0', + 'track_errors=0', + 'report_memleaks=1', + 'report_zend_debug=0', + 'docref_root=', + 'docref_ext=.html', + 'error_prepend_string=', + 'error_append_string=', + 'auto_prepend_file=', + 'auto_append_file=', + 'ignore_repeated_errors=0', + 'precision=14', + 'memory_limit=128M', + 'log_errors_max_len=0', + 'opcache.fast_shutdown=0', + 'opcache.file_update_protection=0', ++ 'opcache.preload=', + 'zend.assertions=1', + ); $no_file_cache = '-d opcache.file_cache= -d opcache.file_cache_only=0'; @@@ -895,9 -893,9 +894,9 @@@ $exts_skipped = 0 $ignored_by_ext = 0; sort($exts_to_test); $test_dirs = array(); -$optionals = array('tests', 'ext', 'Zend', 'sapi'); +$optionals = array('tests', 'ext', 'Zend'); - foreach($optionals as $dir) { + foreach ($optionals as $dir) { if (is_dir($dir)) { $test_dirs[] = $dir; } @@@ -1029,9 -1026,9 +1027,9 @@@ function mail_qa_team($data, $status = { $url_bits = parse_url(QA_SUBMISSION_PAGE); - if (($proxy = getenv('http_proxy'))) { + if ($proxy = getenv('http_proxy')) { $proxy = parse_url($proxy); - $path = $url_bits['host'].$url_bits['path']; + $path = $url_bits['host'] . $url_bits['path']; $host = $proxy['host']; if (empty($proxy['port'])) { $proxy['port'] = 80; @@@ -1449,10 -1446,9 +1447,10 @@@ TEST $fil } /* For phpdbg tests, check if phpdbg sapi is available and if it is, use it. */ + $extra_options = ''; if (array_key_exists('PHPDBG', $section_text)) { if (!isset($section_text['STDIN'])) { - $section_text['STDIN'] = $section_text['PHPDBG']."\n"; + $section_text['STDIN'] = $section_text['PHPDBG'] . "\n"; } if (isset($phpdbg)) { @@@ -1577,9 -1570,9 +1576,9 @@@ $ext_params = array(); settings2array($ini_overwrites, $ext_params); settings2params($ext_params); - $ext_dir=`$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`; - $ext_dir = `$php $pass_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`; ++ $ext_dir = `$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`; $extensions = preg_split("/[\n\r]+/", trim($section_text['EXTENSIONS'])); - $loaded = explode(",", `$php $pass_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`); + $loaded = explode(",", `$php $pass_options $extra_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`); $ext_prefix = substr(PHP_OS, 0, 3) === "WIN" ? "php_" : ""; foreach ($extensions as $req_ext) { if (!in_array($req_ext, $loaded)) { @@@ -1938,9 -1930,9 +1936,9 @@@ COMMAND $cm junit_start_timer($shortname); $hrtime = hrtime(); - $startTime = $hrtime[0]*1000000000 + $hrtime[1]; + $startTime = $hrtime[0] * 1000000000 + $hrtime[1]; - $out = system_with_timeout($cmd, $env, isset($section_text['STDIN']) ? $section_text['STDIN'] : null, $captureStdIn, $captureStdOut, $captureStdErr); + $out = system_with_timeout($cmd, $env, $section_text['STDIN'] ?? null, $captureStdIn, $captureStdOut, $captureStdErr); junit_finish_timer($shortname); $hrtime = hrtime(); @@@ -1966,8 -1958,8 +1964,8 @@@ settings2array($ini_overwrites, $clean_params); settings2params($clean_params); $extra = substr(PHP_OS, 0, 3) !== "WIN" ? - "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": ""; + "unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;" : ""; - system_with_timeout("$extra $php $pass_options -q $clean_params $no_file_cache \"$test_clean\"", $env); + system_with_timeout("$extra $php $pass_options $extra_options -q $clean_params $no_file_cache \"$test_clean\"", $env); } if (!$cfg['keep']['clean']) {